SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: membery exhausted?!
-
Dec 4, 2009, 01:06 #1
- Join Date
- Nov 2004
- Location
- Hong Kong
- Posts
- 173
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
membery exhausted?!
I've just moved my scripts from one hosting account to another.
The script works well in the old one, but not the new one.
http://www.maru-ai.org/thumbnail.php...&fn=r23shi.jpg
It shows:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20400 bytes) in /home/maruiorg/public_html/thumbnail.php on line 7
Line 7:
$img = imagecreatefromjpeg($fn);
I don't understand why 20400 bytes cannot be allocated from 33554432 bytes...
Please help
-
Dec 4, 2009, 01:18 #2
- Join Date
- Nov 2005
- Posts
- 1,191
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It's not saying 33554432 bytes are all free, that is just the total allowed, other parts of your script will be chewing on it as well. When you call imgcreate there is less than 20400 bytes free.
-
Dec 4, 2009, 01:19 #3
- Join Date
- Nov 2004
- Location
- Hong Kong
- Posts
- 173
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The problem is solved by adding this line to .htaccess
php_value memory_limit 192M
It seems that PHP's error message is not correct (about the numbers)
-
Dec 4, 2009, 01:20 #4
-
Dec 4, 2009, 01:36 #5
- Join Date
- Oct 2009
- Posts
- 1,852
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Whoa. Are you doing resize on the fly? Wonder, how long this server will stay alive o_O
-
Dec 4, 2009, 01:39 #6
Bookmarks