0

Hi,

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

3
Contributors
9
Replies
25
Views
4 Years
Discussion Span
Last Post by bojan123
0

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..

ini_set('set_memory_limit',-1);   

Edited by mrvijayakumar: minor spell change :)

0

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.

0

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
</IfModule>

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

0

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

0

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.. :)

Edited by mrvijayakumar: added 1 line, to close the thread if its solved..

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.