Does PHP set memory limits on arrays?
So, I don't know how or why this worked, but I fixed the problem by commenting out these two lines from my .htaccess file:
# php_value memory_limit 1024M# php_value max_execution_time 18000
I did this because I noticed phpinfo() was returning different values for these settings in the two columns "master" and "local".
My php.ini had memory_limit=512M and max_execution_time=3000, whereas my .htacces file had the above values. I thought .htaccess would just override whatever was in php.ini but I guess it caused a conflict. Could this be a possible bug in php?
There's a number of steps some PHP distributions, security packages, and web hosts take to prevent users from raising the PHP actual memory limit at runtime via ini_set
. The most likely candidate is the suhosin security package.
This older Stack Overflow question has a number of other suggestions as well.