imageCreateFromJPEG() Crash/Freeze/???

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi, everyone,

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:

  calling imageCreateFromJPEG(CONVAR118.jpg)

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.

Re: imageCreateFromJPEG() Crash/Freeze/???

Quoted text here. Click to load it
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.

Site Timeline