Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

webtuts4u's avatar

PHP artisan "PHP Fatal error" on allowed memory size

It's confusing, why this error shown. I'm using Laravel 5.4, after using composer update. Then error shown

Script php artisan optimize handling the post-update-cmd event returned with error code 255

At last this error shown when using php artisan command.

$ php artisan
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 53248 bytes) in E:\xampp\htdocs\xPro\vendor\symfony\debug\Exc
eption\FlattenException.php on line 208
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in E:\xampp\htdocs\xPro\vendor\symfony\debug\Exc
eption\FatalErrorException.php on line 1

I also update php.ini with memory_limit 2048M. But still same error shown.

Any suggestion to fix this.

0 likes
2 replies
Nash's avatar

You probably have a different php.ini in use for the command line. Run php --ini and look for the "Loaded Configuration File" line to see where the file is located.

2 likes

Please or to participate in this conversation.