These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for php memory_limit problem; where to set? on the new forum.
Hi,
for a script, I need the PHP memory limit to be 64 or more. It now doesn't run, as it's set to 32, according to phpinfo:
memory_limit local value: 32M master value: 512M
I thought the local value would be set in /home/-virtualserver-/etc/php.ini, but in there I found it to be set to 128M.
Why is it only 32? Does anyone know where I should look? Thanks!
Some details:
Operating system Ubuntu Linux 10.04.1
Webmin version 1.540
Virtualmin version 3.84.gpl GPL
Kernel and CPU Linux 2.6.32-30-generic on x86_64
Everything is updated to the latest versions.
If your $HOME/etc/php.ini file is set to use a 124M limit, but you're getting 32M, that may mean that this particular Virtual Server is set to use mod_php rather than CGI or FCGID.
If you take a look in Server Configuration -> Website Options, what is the PHP Execution Mode set to there?
-Eric
Thanks Eric,
it's set as "FCGId (run as virtual server owner)". So that's a bit strange then isn't it?
I've set it to CGI wrapper "(run as virtual server owner)" and now it's fine. Let's see if that has other consequences.
Thanks Eric!
Oh sorry, I was looking at the wrong place. It's still 32...
There is an issue in Ubuntu 10.04 that caused all websites, whether they ran in CGI, FCGID, or mod_php -- to run under mod_php.
That's been corrected in newer versions of the install.sh, but if you have an older installation (or an older install.sh version), it's possible that bug is present on your server.
Take a look at /etc/apache2/mods_enabled/php5.conf, are there any "SetHandler" lines in there?
If so, comment those out, and restart Apache. Then, try it again and see if that works for you.
-Eric
Thanks Eric, that worked!
Looking at the server with 'top', I now notice that there quite a few 'php5-cgi's at the top of the list using quite a bit of memory.
Am I correct to think these would have shown as 'apache2' before this change?
Thanks.
Yeah, PHP runs as a separate process in CGI and FCGID. All the PHP modules would have previously been loaded within Apache.
-Eric