From: cyleriggs at kc dot rr dot com Operating system: Linux 2.6.8.1 PHP version: 5.0.1 PHP Bug Type: GD related Bug description: ImageCreateFromJpeg returns 'not a valid jpeg file'
Description: ------------ When calling ImageCreateFromJPEG() on a valid jpeg file it fails and i get errors such as the following in my php error log: <code> [28-Aug-2004 05:21:29] PHP Warning: imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: '/usr/local/apache2/htdocs/pictures/Before Dad Went to Iraq/IMGP0008.JPG' is not a valid JPEG file in /home/www/pictures/index.php on line 43 </code> however as can be seen through this link the file is a valid jpeg file: http://cyle.dyndns.org/pictures/Before Dad Went to Iraq/IMGP0008.JPG Also i have a memory_limit of 25mb so this cannot be the issue. Something that might help: http://cyle.dyndns.org/phpinfo.php I am writing this code for a picture gallery browser, while most pictures load, about 10% of my pictures cannot be opened through ImageCreateFromJpeg(), however it is always the same pictures that cannot be opened. The only trend i can see is that this does not appear to be happening on small jpegs. The page that I am having problems with is http://cyle.dyndns.org/pictures/index.php. The source code for this is at http://cyle.dyndns.org/pictures/index.phps. Expected result: ---------------- The image would be loaded and code continue to execute and i get the error message described above. Actual result: -------------- Sometimes images load sometimes images cannot be opened. -- Edit bug report at http://bugs.php.net/?id=29878&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29878&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29878&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29878&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=29878&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29878&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29878&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29878&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29878&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29878&r=support Expected behavior: http://bugs.php.net/fix.php?id=29878&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29878&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29878&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29878&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29878&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29878&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29878&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29878&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29878&r=float