Why do I get the error Allowed memory size of Xxx bytes exhausted?
this is because you have exhausted your memory on your server. this often happens when you have a large site or with big files or simply have really messy coding that requires alot of resources from your web server. In shared hosting, this is common. however, if you have a dedicated server you can chang the memory limit in your php.ini file to 16 or 32. but if you don't have a dedicated server you can create a .htaccess file to do the same without changing the php.ini file.
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:
If there's no "memory_limit" parameter in your phpinfo page, then all PHP/Webserver processes are limited by the per process max memory limit. You'll have to ask an administrator to change the limit in this case. On linux/unix, you can check the limit with the following command in the shell:
Or with PHP with a script check.php
<?php print system('ulimit -a'); ?>