Hello everyone, just like many others I had the Fatal error: Allowed memory size of X bytes exhausted. Quickly finding the stickied post but that was a huge bummer as this was what it said:
Alternative 1 (ideal):Increase the memory limit allocation in php.ini. You must be the server's administrator to do this. Also, .htaccess files cannot change this configuration setting, and it cannot be changed using ini_set().
I tried the other alternatives but even pictures at 640x480 didnt got through the standard 8M that php is set at.
Now out of curiosity I went to the Gallery 2 forums to see what they said about this error (It's a php error so every gallery using gd will do the same) and I was amazed to see them stating the opposite of the admin on this board!
.htaccess CAN CHANGE this setting
and it CAN BE CHANGED using ini_set().
I'm running coppermine integrated in a joomla installation with search engine friendly links so I was already using a .htaccess file so I went ahead and tried what they said at Gallery 2 FAQ. Here it is, it DID fix the solution to me completely, while not being able to upload 640x480 pics I can now upload high res photo's as you can see on
http://www.huisdierengedrag.be/gallerij. As a sight note, the ini_set() command shown here is specific for gallery 2 installations, if anyone can figure out if which php file it goes of the cpg installation that would be great
Quote from Gallery 2 FAQ:
You are exhausting the available memory that PHP has access to. In php.ini there is a config variable named memory_limit that by default is set to 8MB. Edit php.ini and increase it to a larger value (restart Apache afterwards). If you don't have access to php.ini, you can add this line to your .htaccess file in your gallery2 folder. Usually, unless you are the owner of the server, you don't have access to change php.ini. If there is no .htaccess file yet, you can create one (it's just a text file with the name '.htaccess').
php_value memory_limit [new memory limit]
To change it to 24 MB, write:
php_value memory_limit 24M
If the .htaccess method does not work or if you get an internal server error after adding this line, remove the line from the .htaccess again. You can also try to change the memory_limit by adding the following line right after '<?php ' in install/index.php and in main.php:
ini_set("memory_limit","32M");