#2070 - Uploaded jpg files error with CORRUPT_FILE
0 guests and 0 members have recently viewed this.
The top 3 point earners from 8th Feb 2026 to 15th Feb 2026.
| Gabri |
|
|
|---|---|---|
| Master Rat |
|
|
| PDStig |
|
|
There are no events at this time
a) I cannot reproduce
b) There are no code changes in .21 around images or uploading that could cause it
I suspect either it is an incompatibility somewhere, JPEG support not being compiled into your PHP version, or the files really corrupt. There is a reasonable chance that GD is less tolerant of corrupt images than a browser will be, and that things such as CMYK images may not work on it but may work on some browsers.
...and other formats such as PNG work fine.
Since my site doesn't fully support CURL anymore for some odd reason, despite CURL being compiled and trying to run it with different versions and configurations of PHP, I wonder if it's falling back to fsock, and somehow fsock is improperly downloading JPGs.
I ran a test command via Commandr...
:require_code('files');echo gettype(imagecreatefromstring(http_download_file('https://lovinity.org/uploads/galleries/Untitled.jpg')));:
And got...
PHP WARNING [2] imagecreatefromstring() [<a href='http://www.php.net/manual/en/function.imagecreatefromstring.php'>function.imagecreatefromstring.php</a>]: No JPEG support in this PHP build
PHP-info confirms. JPEG support is there for EXIF, but not GD.