0
votes

I'm getting this error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3456 bytes) in /home/gigiphot/public_html/Includes/thumbnail.inc.php on line 158

and this PHP memory limit is set to 64mb .. do I increase it? Not sure of next step...

2
To add to this: 64 megs is a lot. If this script is going to be used quite a bit, consider making it consume a lot less. High memory consumption can definitely take your server down if people start hitting it. - Evert

2 Answers

0
votes

You can set memory_limit in your php.ini file, see here: http://php.net/manual/en/ini.core.php

However, you may want to investigate if you really need such a heavy memory consumption... if this service will be used by multiple users concurrently, you may have problems... An unintended high memory consumption is often a symptom of something going wrong in your script.

0
votes

Try adding ini_set('memory_limit', '128M'); to the top of the file.

You can set it to -1 to ignore the limit, but it's not generally recommended.