Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php

前端 未结 21 1240
猫巷女王i
猫巷女王i 2020-11-21 22:14

This error message is being presented, any suggestions?

Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php

21条回答
  •  醉话见心
    2020-11-21 22:59

    I had the same issue which running php in command line. Recently, I had changes the php.ini file and did a mistake while changing the php.ini

    This is for php7.0

    path to php.ini where I made mistake: /etc/php/7.0/cli/php.ini

    I had set memory_limit = 256 (which means 256 bytes)
    instead of memory_limit = 256M (which means 256 Mega bytes).

    ; Maximum amount of memory a script may consume (128MB)
    ; http://php.net/memory-limit
    memory_limit = 128M

    Once I corrected it, my process started running fine.

提交回复
热议问题