View Full Version : imagecreatefromjpeg failing

05-06-2009, 10:00 PM
I've read a zillion quesitons and comments regarding problems with imagecreatefromjpeg(), mostly instances where it was running out of memory. Upping "memory_limit" from php.ini fixed most of the problems I read about.

In my case imagecreatefromjpeg (or @ImageCreateFromJpeg) don't appear to return at all when I pass it a 4 megabyte file (it works on smaller files (exactly how much smaller, I'm not sure of at the moment - at least 1meg).

I've set memory_limit, post_max_size, and upload_max_filesize real high. The file passed to imagecreatfromjpeg is first uploaded, and the 4meg+ files do that just fine. The problem is when I hit imagecreatefromjpeg.

Any help is most appreciated.

BTW, it works fine on my local machine, but not on my host's server.

05-07-2009, 01:00 AM
Remove the mutor from it and either display you're errors or review you're error log (go for the log). Post the error message that provides.
Without knowing the error, my initial assumptions are either that a) you're host doesn't support this function, or b) you're host cannot open the file specified.
The error will tell you what it is.

I missed the part about the 1mb files being ok.
Post the error anyway.

05-07-2009, 01:59 AM
Thanks for the advice. After a bunch of trial and error adjustments, I got it working, and I am embarrassed to say, I have no idea what I did (so I would imagine it was something in my code - though why it was working fine on smaller files, and why larger files worked on my machine, I have no idea).

I will have that debugging log active next time. Thanks for the advice. I'll remove the, umm, mutor(?) from it.