Memory limit does down when using Apache mod_php


If i use “PHP script execution mode ->Apache mod_php (run as Apache’s user)” phpinfo says ‘Local Value Memory_limit 32M’

In website options its 128M, in /home/mysite/etc/php5/php.ini its 128M, global value is 128M. Where this 32M come from?

If i turn PHP script execution mode ->FCGId, php info says its 128M.


When using mod_php, it no longer uses $HOME/etc/php.ini, and it instead uses a system-wide config file. Where exactly that is depends on your distro, but on the sysem I’m looking at here, that’s in “/etc/php5/apache2/php.ini”. And then, after changing the values in there, you may need to restart Apache for the settings to take effect.


Global setting was 128. I found it, Virtualmin -> Configure Website -> php -> PHP Configuration Values

For some reason, there was memory_limit 32M