最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Composer PHP Fatal error:Allowed memory size of
时间:2014-10-20 编辑:简简单单 来源:一聚教程网
今天在运行composer update时遇到的,详细的错误消息如下:
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted
(tried to allocate 32 bytes) in phar:///usr/local/Cellar/composer/
1.0.0-alpha8/libexec/composer.phar/src/Composer/DependencyResolver/
Rule.php on line 62
Fatal error: Allowed memory size of 536870912 bytes exhausted
(tried to allocate 32 bytes) in phar:///usr/local/Cellar/composer/
1.0.0-alpha8/libexec/composer.phar/src/Composer/DependencyResolver/
Rule.php on line 62
一直以为是网络原因,最近连接国外的网络不是很稳定,后来根据报错的信息Allowed memory size of 536870912 bytes exhausted提示知道可能是内存分配不够,大家知道在PHP的配置文件php.ini中有限制脚本运行内存的设置memory_limit把这个值调大一些就可以解决这个问题了。
memory_limit = 1G
当然大家也许不喜欢随随便便的改动配置文件php.ini,在帖子《Composer update runs out of memory #1898》Dynom给出了个临时的解决办法:
php -dmemory_limit=1G composer.phar update
-
下一个: php多级树形菜单代码
相关文章
- PHP导出数据超时的优化建议解读 10-31
- PHP之mysql位运算解析 10-31
- Laravel实现登录跳转功能解析 10-31
- php双向队列解读 10-31
- Laravel异常上下文解决教程 10-24
- php数组查询元素位置方法介绍 10-24