[英]PHP artisan "PHP Fatal error" on allowed memory size in Laravel
It's confusing, why this error shown.令人困惑,为什么显示此错误。 I'm using
Laravel 5.4
, after using composer update
then this error shown.我正在使用
Laravel 5.4
,在使用composer update
之后显示此错误。
$ 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
As some of answer on stack and other community, i'm also test this after update php.ini
with memory_limit 2048M
.作为堆栈和其他社区的一些答案,我也在使用
memory_limit 2048M
更新php.ini
后对此进行测试。 But still same error shown.但仍然显示相同的错误。
Any suggestion for this issue.关于这个问题的任何建议。
This is memory limit issue.这是 memory 限制问题。 You can try something like this
你可以尝试这样的事情
Fist find composer directory using bellow command拳头使用波纹管命令找到作曲家目录
$>which composer
/usr/local/bin/composer
After you can update composer with memory limit在您可以使用 memory 限制更新作曲家之后
$>php -d memory_limit=-1 /usr/local/bin/composer update
-1
means unlimited memory -1
表示无限制 memory
In my case helped this在我的情况下帮助了这个
php -d memory_limit=1 artisan xxxxxxx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.