I have a problem with PHP

error is:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4320001 bytes) in /home/explorer/public_html/secure/foto/libs/upload/Image.php on line 480

Image.php code > http://pastebin.com/Wu8cHYUx

Please help

Change the memory size in php.ini file because the allocated memory 67108864 bytes is 64MB. Try to set 128MB or something..

Or use below code as first line of the page..


I do not have php.ini
How I can make it?

Try the ini_set above in your script. If this is running on a shared webhost, you may be out of luck. Very likely that this setting has been disabled.

As mentioned, try ini_set.

Try below also, add following code in your .htaccess file which is in your root directory, if its missing, create one,

<IfModule mod_php5.c>
php_value memory_limit 128M

*Note: .htaccess will works with Linux servers not Windows based. :)

Therefore, .htaccess put in the root folder, not in secure (script requires SSL)?
Ok, i have linux server :)

It will be secured only, for more secutiry try to change the file permissions from default to CHMOD 444.

If above thread not works, try only php_value memory_limit 128M remove adding inside IFModule..

If you got answer, please mark as solved.. :)

.htaccess with ini_set does not work :(
Another solution?

php_value memory_limit 128M < not work :(

My hosting provider put a memory limit to 128MB. Problem solved :)