I ve tried to expand the memory limit of php in the loaded ini file /etc/php5/apache2/php.ini, restarted the server but it doesnt seem to take effect. Is there some other conf file included that I should be aware of?

Comments

jcfiala’s picture

Check phpinfo(); - it usually reports both the 'global' value of a setting along with what setting is being used. If your new setting shows up in the global, and not in the used setting, then it's probably being set in settings.php.

On the other hand, if you don't see it showing up at all in the file, then look in the dump and see which ini file is being read.

domidc’s picture

On the localhost page phpinfo is displayed automatically and it still says 64M when I change it to 128M forexample in /etc/php5/apache2/php.ini
Checked settings.php nothing that thouches the setting.

rfay’s picture

@domidc, did you forget to restart apache?

Read http://drupal.org/node/207036 for complete details.

In Quickstart 0.6, I just changed memory_limit in /etc/php5/apache2/php.ini and restarted apache:
sudo /etc/init.d/apache2 restart

And the memory limit changed, as viewed at admin/reports/status/php

MichaelCole’s picture

Status: Active » Fixed

PHP Config files can be found at ~/websites/config/php-apache.ini and php-cli.ini

Make sure to restart apache like rfay said: sudo apache2ctl restart

Good luck!

Mike

izmeez’s picture

I had to add a line in the settings.php file to up the memory. Even though there is no line it seemed to default to 32MB.

What I wrote before may be misleading. I should have simply said that I added a line in the php settings section of settings.php and that worked to increase the memory limit.

ini_set('memory_limit', '256M');

This is as one would expect, so I am not really adding anything to this discussion as it should also work if the php config file is changed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

liquidcms’s picture

Status: Closed (fixed) » Active

i think as original posted there is still something messed up here.

i go to /localhost which displays phpinfo() which states php.ini is at: /etc/php5/apache2/php.ini

i edit php.ini and set memory_limit to 256M

restart apache

phpinfo() still states 128M and my site does die at this limit.

there is nothing in settings.php for this.

liquidcms’s picture

setting this in settings.php does override (which i think is also wrong as it shouldn't be able to go higher than the global value. but still something messed up that the 128M seems to be hardcoded somewhere.

MichaelCole’s picture

Status: Active » Closed (cannot reproduce)