Why is Garland complaining about php memory limit?

Venkat-Rk - April 9, 2007 - 14:55

On a new VPS with just one hosting account, when I try to change a Garland colour theme, I get the following error:

There is not enough memory available to PHP to change this theme's color scheme. You need at least 2.32 MB more. Check the PHP documentation for more information.

I changed the memory limit in php.ini from 8 to 32 mb and then to 64mb, but I still get the same error. thanks for any suggestions to resolve this.

I changed the memory limit

Venkat-Rk - April 10, 2007 - 07:30

I changed the memory limit in php.ini from 8 to 32 mb and then to 64mb, but I still get the same error.

I was editing the wrong php.ini file. Works now. But, it's interesting that garland requires 10.32MB (default 8M + the 2.32 that Garland was reporting as necessary) to change the theme. Hope this helps someone.

----
Previously user Ramdak.

help with php.ini

willi.firulais - April 11, 2007 - 21:49

Hallo,

have the same problem. which one was your correct php.ini file location?

regards, willi

---

VeryMisunderstood - April 11, 2007 - 22:01

create a page content type
add this

<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

and sumbit it with the PHP input format.

then visit the page you just created and it will list all your php defaults including where php.ini is located. Typically on a shared host you don't have access to this file and you have to copy it from usr/bin off your server and drop it into your drupal directory to override php host defaults. Provided your host allows you to do so.

On my VPS, it's at

Venkat-Rk - April 17, 2007 - 12:06

On my VPS, it's at /usr/local/lib/php.ini

That should be the standard path on most providers, but you should certainly check with your host. The funny thing is that if you are using cPanel, the phpinfo link when you login to the site's cpanel is NOT the correct path. This tripped me up for quite a while (I was seeing totally different versions of php compared to what was installed) until my host told me the path and suggested creating a phpinfo.php file as VeryMisunderstood explained and putting it in the web root of the domain (public_html).

----
Previously user Ramdak.

In MAMP, it's harder to find...

dbabbage - April 6, 2008 - 02:30

I was having exactly the same problem on my Development server running MAMP Pro. I finally discovered that MAMP has the interesting behaviour of overwriting the php.ini files with its template every time you restart the server. Found the solution here. In MAMP Pro, simply select File>Edit Template>PHP 5 php.ini, and edit the memory figure there instead. That way, it'll still be at 16M (or whatever) every time you restart. :)

 
 

Drupal is a registered trademark of Dries Buytaert.