Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 13965430 bytes)
PHPInfo shows that I have a memory_limit of 128M, so I'm confused as to why the error says I only have 64M. Is it possible for phpinfo to report incorrectly? Or for PHP to use two separate php.inis?
The error was being caused by an ini_set call in one of the primary php files that a co-worker of mine added without my knowledge.
PHP's config can be set in multiple places:
php.ini
(usually in /etc somewhere)php_value
)php.ini
(use the command php -i | grep memory_limit
to check the CLI conf)php_value
)ini_set()
)In PHPinfo's output, the "Master" value is the compiled-in default value, and the "Local" value is what's actually in effect. It can be either unchanged from the default, or overridden in any of the above locations.
Also note that PHP generally has different .ini files for command-line and webserver-based operation. Checking phpinfo()
from the command line will report different values than if you'd run it in a web-based script.