PHP Command-line scripts are ignoring php.ini and ini_set('memory_limit',…) directives

前端 未结 2 1782
天命终不由人
天命终不由人 2021-01-06 05:14

I am facing the common \"Fatal error: Out of memory (allocated 30408704) (tried to allocate 24 bytes)...\" PHP Fatal error. Pages served via Apache are not exhibiting this b

相关标签:
2条回答
  • 2021-01-06 05:42

    your PHP on cli may be using a different php.ini to your apache php. try a phpinfo() and check its using the ini file you think its using.

    0 讨论(0)
  • 2021-01-06 05:51

    It turns out that the problem was caused by shell fork bomb protection being enabled on the server that was placing a hard memory limit on all command-line scripts. This had been enabled by my web host without my knowledge.

    0 讨论(0)
提交回复
热议问题