Memory limit, thumbnail generating

Status
Not open for further replies.

altrock182182

New Member
Messages
40
Reaction score
0
Points
0
I have a PHP script that looks something like this:

PHP:
if (thumbnail exists)
{output path to thumbnail}
else
{create thumbnail
 output path to thumbnail}

It's hitting the memory limit... I'm guessing it's around 33 megs, which i can't see how my first thumbnail is hitting that in a single script. All I can see to do is load it in my personal server and then upload the thumb to the fileserver (kills the whole point of the script).

I'm also considering upgrading to the corporate hosting plan soon, would that make any difference in the memory limit? After a thumbnail is generated once it is cached, so it would rarely need to go above what it is now.

I highly doubt this would be grounds for an advanced php config, so I'm not going to bother asking about that.. but would a paid account help this?
 

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
I think the paid server has a memory limit of 32mb.
I'm not sure on what your doing, but if I understand it right you are creating thumbnails from regular images. Try making the regular images smaller.
 

altrock182182

New Member
Messages
40
Reaction score
0
Points
0
What code are you using for thumb generation?

I don't have it here, but memory-wise it's like this:

PHP:
if ( file_exists($file_thumb)){echo $file_thumb}
else{
::load $file into memory
::Transform $file into thumbnail
:: save thumbnail as $file_thumb
:: echo $file_thumb
}
 
using the GD library
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
It shouldn't hit the limit on the first image unless your file is like 8MB or so.

Did you remember to destroy the image after saving it?
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
The memory limit on the paid server ciroc is 32M. If you wanted it raised as a paid member you'd have to talk with Corey or Bryon.
 
Status
Not open for further replies.
Top