0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

"phpseclib\Crypt\AES" not found の解決法

Posted at

エラー内容

Fatal error: Uncaught Error: Class "phpseclib\Crypt\AES" not found in /var/www/html/myapp/fuel/core/classes/crypt.php:438 Stack trace: #0 

解決方法

  1. rm composer.lock
  2. composer.jsonファイルに下記の記述を追加
   "require": {
    ~省略~
       "phpseclib/phpseclib": "3.0.0",
       "phpseclib/phpseclib2_compat":"~1.0"
   },
  1. composer install

参考記事:https://stackoverflow.com/questions/66088906/class-phpseclib-crypt-random-not-found

経緯

上記エラーの解決までにかなり時間を費やしたので、メモとして残しておきます。

依存関係エラーで
"phpseclib/phpseclib": "2.0.0"がインストールできずに悪戦苦闘していました。
ちなみに他のパッケージファイルのバージョンは以下

"require": {
        "php": "^8.0",
        "composer/installers": "~1.0",
        "fuel/core": "dev-1.9/develop#2c8c548a2f9f4aa08ecfe321c3e744d03472479c",
        "fuel/auth": "1.8.*",
        "fuel/email": "1.8.*",
        "fuel/oil": "1.8.*",
        "fuel/orm": "1.8.*",
        "fuel/parser": "1.8.*",
        "fuelphp/upload": "2.0.6"
    },

最初は"phpseclib/phpseclib": "3.0.0"のみ追加を試みましたがエラーは解決せず・・・

参照記事の通り、phpseclib/phpseclib:~2.03.0を並行して使用したい場合は、"phpseclib/phpseclib2_compat":"~1.0"が必要なようです。

phpseclib v3の新しい名前空間を2.0にあわせて変更してくれるファイルのようです。

無事解決できてcookie関係のエラーが出なくなり一安心です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?