Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- imageCreateFromJPEG() Crash/Freeze/???
- Scott Brady Drummonds
August 25, 2004, 11:55 pm
rate this thread
I'm a PHP novice and am working on some PHP code that will display
thumbnails for all images in a given directory. The following snippet of
code is where the problem occurs:
echo "<p>calling imageCreateFromJPEG($file)\n";
$src_img = imageCreateFromJPEG($file);
echo "<p>imageCreateFromJPEG() succeeded!\n";
The last thing shown in the web page is:
Nothing more is displayed. That is, no more PHP code after the call to
imageCreateFromJPEG() is executed. If I comment out that line, the rest of
the code runs as expected. What doesn't make sense to me is that manual
entry I read online said that a failed call to imageCreateFromJPEG() would
return an empty string. So, if an empty string should denote a failure, and
a resource returned on success, why am I getting nothing at all?
I'm using PHP 4.3.6 that *does* have GD enabled (bundled (2.0.22
compatible)). I cannot change either of these versions easily.
Can anyone offer me any direction?
Remove .nospam from my e-mail address to mail me.
- Varavva Yevgen aka xa4anypu
August 30, 2004, 5:41 pm
Re: imageCreateFromJPEG() Crash/Freeze/???
As i remember if you have any text output, you can't send any images from
the same script using Image***() function. To do this, i usually have
another script which generates an image and then include it using <img> tag.
Though your problem is not here, you should note this.
- » 1/2[OT]: download just the required code of 'escapeshellarg()' functionfrom cvs
- — Next thread in » PHP Scripting Forum
- » Extension system a complex problem about expanding a complex script
- — Previous thread in » PHP Scripting Forum