douzhaiyuan1731 2018-05-21 07:32
浏览 162
已采纳

php.exe(WAMP)无法分配超过1G的内存,即使内存_limit设置为-1

Since a few days, I cannot update my Symfony projects using Composer because the php.exe process from my WAMP install cannot allocate more than 1G of memory... I don't recall making any changes in my PHP settings.

In the php.ini (yes, the correct one), I've set memory_limit to -1. My composer diagnose is all set to OK.

  • My PHP version is 5.6.18
  • My WAMP version is 3.1.3
  • My OS is Windows 7
  • My Composer version is 1.6.5

Could it come from a Windows setting?

Here is the error message I get :

Fatal error: Out of memory (allocated 1397751808) (tried to allocate 268435456 bytes) in phar://C:/wamp/www/DESiwid/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220
Segmentation fault

I have the same kind of error with a PHP test standalone script that I have coded to allocate :

set memory_limit to 810M
memory limit is 810M
try allocating 800 megabyte...pass.Usage: 800.5 Peak: 800.5
memory_limit (get value):849346560
set memory_limit to 860M
memory limit is 860M
try allocating 850 megabyte...pass.Usage: 850.5 Peak: 850.5
memory_limit (get value):901775360
set memory_limit to 910M
memory limit is 910M
try allocating 900 megabyte...pass.Usage: 900.5 Peak: 900.5
memory_limit (get value):954204160
set memory_limit to 960M
memory limit is 960M
try allocating 950 megabyte...
Fatal error: Out of memory (allocated 262144) (tried to allocate 996147201 bytes
) in C:\wamp\www\_test\memory.php on line 5
  • 写回答

1条回答 默认 最新

  • dongqiang1894 2018-05-29 05:56
    关注

    OK I found a solution : I was using WAMP 32bits, and switched to WAMP 64bits, that solved everything.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改