tags:

views:

385

answers:

2

I'm using PHPs imagecreatefromjpeg to load a jpeg from disk and imagejpeg to output that image to the browser. For some reason though, this function is only outputting the image when the server is running on a Windows development box. On our Linux server, its not outputting any data (ie. Content-Length: 0, nothing is displayed).

Are there any workarounds that make this work on a Linux box? I've confirmed that the GD library is installed with jpeg support.

+1  A: 

There are two notes on http://php.net/imagejpeg which may be relevant:

Notes

Note: JPEG support is only available if PHP was compiled against GD-1.8 or later.

Note: If you want to output Progressive JPEGs, you need to set interlacing on with imageinterlace().

Also some actual code would be useful in attempting to help.

Unkwntech
A: 

Make sure you have the correct file permissions set. Does your web service own the file? Does it have permission to read or write the file?

jjclarkson