0
なぜこのエラーが表示されるのですか?私はcomposer update
を使用した後にLaravel 5.4
を使用していますが、このエラーが表示されます。Laravelの許可されたメモリサイズに関するPHPの職人 "PHP Fatal error"
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 495616 bytes) in E:\xampp\htdocs\botble\vendor\symfony\debug\ExceptionHandler.php on line 238
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in E:\xampp\htdocs\botble\vendor\symfony\debug\Exception\FlattenException.php on line 203
Script php artisan optimize handling the post-update-cmd event returned with error code 255
スタックおよびその他のコミュニティへの答えの一部として、私はまた、memory_limit 2048M
と更新php.ini
後にこれをテストしています。しかし、まだ同じエラーが表示されます。
この問題に関するご提案です。
無制限のメモリを意味し、 128Mのメモリ制限がまだ存在しているので、あなたの設定が適用されない理由について調査したいと思います。 – flauntster
"service apache2 restart"または "service nginx restart"コマンドを使用してサーバーを再起動しましたか? –
私は全体的にメモリの制限を増やすつもりはない、悪意のあるスクリプトやバグのあるスクリプトがDoSを引き起こさないようにするためです。 'php -d memory_limit = 2048M/path/to/composer update' – Geoffrey