Welcome Guest, Not a member yet? Register   Sign In
Resizing image with GD
#1

[eluser]magiccyril[/eluser]
Hye,

I have some trouble when I try to resize an uploaded image with GD. I tried to trace the execution, and the problem seem to came from the function image_create_gd in Image_lib.php with the GD function imagecreatefromjpeg.
Before this function if I put an "echo" I see it, just after I have a blank page.

The server has GD enabled, JPG Support enabled.
In fact I've developed this code on a Windows server with GD 2.0.34 and everything was OK, but the (Linux) production server use GD 2.0.28, and with the same code I have a blank page. Do you think the problem can came from this difference ?
#2

[eluser]George Ornbo[/eluser]
Have you got PHP error reporting on? You can check this in php.ini. If you have it is odd that there is no message. Is the image being written to the folder?

The other suggestion I can offer is permissions on the folder that is being written too. Apache needs to be able to write to that so make sure permissions are ok.
#3

[eluser]magiccyril[/eluser]
I just saw the appache log, and there is a php fatal error with maximum allowed type exceed (or something like that), and it seem to stop at 20Mo.
So I have increased the PHP Memory Limit to 50Mo (with “ini_set(’memory_limit’, ‘50M’);” ), and the problem was solved but I don’t like this solution.

My test picture is only a 41Kb picture, and this picture needs 50Mo to be loaded ???




Theme © iAndrew 2016 - Forum software by © MyBB