[eluser]Arpanet[/eluser]
Hi there,
I've been receiving this error message when trying to upload photos;
Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 11328 bytes) in /user/htdocs/CodeIgniter/libraries/Image_lib.php on line 1157
Obviously this is something to do with the memory limit set in php. My website is on a shared hosting platform and the memory_limit in php is set to 20mb.
What I don't understand is that the photo I have been uploading is only 2mb. I have tried a couple of solutions that I found online, but these don't seem to have had any effect;
1. Set the following in the index.php;
Code:
ini_set("memory_limit","30M");
2. Set the following in the .htaccess;
Code:
<IfModule mod_php5.c>
############################################
php_value memory_limit 30M
php_value max_execution_time 18000
</IfModule>
Has anyone else had this issue?
Thank you.