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

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

图片转代码服务由CSDN问答提供 功能建议

几天后,我无法使用Composer更新我的Symfony项目,因为我的WAMP安装中的php.exe进程无法 分配超过1G的内存......我不记得在我的PHP设置中做了任何更改。

在php.ini中(是的,正确的),我已经设置了 memory_limit为-1。 我的作曲家诊断设置为OK。

  • 我的PHP版本是5.6.18
  • 我的WAMP版本是3.1.3
  • 我的操作系统是Windows 7
  • My Composer版本是1.6.5

    它可能来自 Windows设置?

    以下是我收到的错误消息:

     致命错误:内存不足(已分配1397751808)(尝试分配)  268435456字节)在第220行的phar:// C:/wamp/www/DESiwid/composer.phar/src/Composer/DependencyResolver/Solver.php 
    分段错误
       
     
      

    我在编码分配的PHP测试独立脚本中遇到了同样的错误:

     将memory_limit设置为810M 
    memory limit是810M 
    try分配800 兆字节... pass.Usage:800.5峰值:800.5 
    memory_limit(获取值):849346560 
    set memory_limit to 860M 
    memory limit是860M 
    try分配850兆字节... pass.Usage:850.5峰值:850.5 
    memory_limit(获取 值):901775360 
    设置memory_limit到910M 
    memory限制是910M 
    try分配900米 egabyte ... pass.Usage:900.5峰值:900.5 
    memory_limit(获取值):954204160 
    设置memory_limit为960M 
    memory限制为960M 
    try分配950兆字节... 
    Fatal错误:内存不足(已分配262144)( 试图在第5行的C:\ wamp \ www \ _test \ memory.php中分配996147201字节
    )
       
     
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题