Page 1 of 1

imagecreatefromjpeg() error please help

Posted: Tue Jun 25, 2013 5:56 am
by g0kh4n
I have never seen this errors before. I can't reach some pages. What could be the problem? Some pages are messed up whats going on :((

2013-06-25 0:48:21 - PHP Warning: imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file
in /home/omgamesh/public_html/vqmod/vqcache/vq2-system_library_image.php on line 34
2013-06-25 0:48:21 - PHP Warning: imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: '/home/omgamesh/public_html/image/data/game-cover/medal-of-honor-warfighter-cover.jpg' is not a valid JPEG file in /home/omgamesh/public_html/vqmod/vqcache/vq2-system_library_image.php on line 34
2013-06-25 0:48:21 - PHP Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in /home/omgamesh/public_html/vqmod/vqcache/vq2-system_library_image.php on line 118
2013-06-25 0:48:21 - PHP Warning: imagedestroy() expects parameter 1 to be resource, boolean given in /home/omgamesh/public_html/vqmod/vqcache/vq2-system_library_image.php on line 119
2013-06-25 0:48:33 - PHP Warning: imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file

Re: imagecreatefromjpeg() error please help

Posted: Tue Jun 25, 2013 6:47 am
by g0kh4n
Well, I have realized some image files has corrupted for some reason. They could be corrupted while uploading files to FTP?

Re: imagecreatefromjpeg() error please help

Posted: Tue Jun 25, 2013 7:10 am
by pedro1993
This is a long shot, but I read this, which may be the problem:
http://stackoverflow.com/questions/1243 ... -jpeg-file

Let me know how you get on,

Peter :)

Re: imagecreatefromjpeg() error please help

Posted: Tue Jun 25, 2013 7:28 am
by butte
(1) Retry uploads using FileZilla Client or, in order to hash their names, the OC file manager's uploader; several others may be prone to packet corruptions en route. See if that does the trick.

(2) Set aside the vqmod .xml that appears to be firing up, upload a couple of more specific files to look at, and see if there's improvement then.

(3) Rename your download/ (and for that matter admin/) and tell config.php as well as the admin settings you did that (the reason is (4)).

(4) At worst, these in concert raise an elevated likelihood of hacking, because they suggest possibility of an effort to manipulate a false image that is actually a text file that is hoped to be executable in order to decode mimes or to do other mischief (see for example the whole 4 pages of http://forum.opencart.com/viewtopic.php?f=20&t=98644 among other current threads touching upon security):

gd-jpeg, libjpeg
PHP Warning: imagecreatefromjpeg()
expects parameter 2 to be resource, boolean given
imagedestroy() expects parameter 1 to be resource, boolean given
is not a valid JPEG file
Premature end of JPEG

Re: imagecreatefromjpeg() error please help

Posted: Sat Jun 29, 2013 8:47 am
by g0kh4n
Thanks for everyone trying to help. And thanks god there is not a major problem.

I discovered that some image files are being corrupted while uploading them via FileZilla. But I don't have any idea about why it's happening.

Re: imagecreatefromjpeg() error please help

Posted: Sat Jun 29, 2013 7:38 pm
by pedro1993
I'm glad you got it sorted :)

Re: imagecreatefromjpeg() error please help

Posted: Mon Jul 01, 2013 3:21 am
by butte
You didn't venture to say exactly how you "discovered that some image files are being corrupted while uploading them via FileZilla." FileZilla is robust and makes few mistakes. You likely had packets corrupted by way of traffic or other interferences for a spell of mistimed time. All things considered, still more likely would be something else than file corruption involving FileZilla itself. However, it's resolved for the time being, at least. You may want to wait before marking your title Solved.

Re: imagecreatefromjpeg() error please help

Posted: Wed Jul 15, 2015 2:21 am
by wiysolutions
Thanks.

Jean Sobrinho

Consultor de TI
Celular: +55 041 9972-8613 TIM
Telefone: +55 041 3408-4755
E-mail: jean@wiy.com.br
Site: http://www.wiy.com.br
Skype: jean_sobrinho
Rua Com. Araújo, 146 Sala 43
Rebouças - Curitiba - PR