Re: imagecreatefromjpeg fails on large files
| From: | tmp1000 at fastmail dot fm | Date: | Mon, 19 Jul 2004 23:47:50 +0000 |
| Subject: | Re: imagecreatefromjpeg fails on large files | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191086@lists.php.net to get a copy of this message | ||
[Sorry if there's multiple posts...]
Raditha,
Thanks for the good suggestion. It turns out that the call to
imagecreatefromjpeg succeeds when run from the command line and fails
when invoked via the web server. I guess it is a memory limit issue
of some sort. I tried upping the memory_limit via ini_set and while
my setting seems to take effect according to phpinfo(), the
imagecreate call still fails.
So seeing that it runs from the command line, I tried to have php code
from the web server call a php script via exec(). This resulted in
some truly strange behavior. It seemed that instead of running the
script I asked exec() to run, it ran the same php page that was being
served up by the server. It's like exec was not actually launching
any new process, and I had the same trouble with system() and
back-tics.
I'm pretty much ready to give up on this one. Thanks again for your
help.
-Dave
jabber@raditha.com (Raditha Dissanayake) on Sat, 17 Jul 2004 08:55:26 +0600:
> Hav you had luck running the script from the command line? if that
> works for you it could be that you are hitting the memory limits for
> your php scripts. A JPEG when loaded in memory could take up more
> memory than the size of the file.