Warning: imagecreatefromjpeg - looked, still in need of help Warning: imagecreatefromjpeg - looked, still in need of help
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Warning: imagecreatefromjpeg - looked, still in need of help

Started by pcexhaust, May 22, 2005, 04:50:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pcexhaust

I have read several post reguarding this error:

ERROR:
QuoteWarning: imagecreatefromjpeg(): './albums/edit/mHTTP_temp_ee374a15.jpg' is not a valid JPEG file in /data/3/0/131/23/131838/user/133535/htdocs/askkemp/cpg/include/picmgmt.inc.php on line 209

I have chmod the currect dirrectories to 755 and 777.  I CAN upload images that are in the 100-200KB range.  It seems I only get this problem(error) when I upload an image that has a resolution above 1024x768 (even though the filesize is in the 100-200KB range). So it seems something is wrong when I upload semi-high resolution images(something like a desktop background).  Any help would be greatly appreciated.

INFO:

cpg 1.3.3
Host: NetworkSolutions
OS: Unix : Apache/1.3.29 (Unix) FrontPage/4.0.4.3 FrontPage/5.0.2.2634 ApacheJServ/1.1.2 mod_auth_pam/1.1.1
PHP: 4.3.10
file_uploads   On
post_max_size   8M
upload_max_filesize   5M
upload_tmp_dir   /data/tmp
GD Version    2.0 or higher

Test Account:
www.askkemp.com/cpg
USER: auser
PASS:  auser


Thank you,
Kemp

Joachim Müller

There are several server vars that have to be taken into account: although a file may be small in file size, there might be issues because of large resolutions / dimensions. There's no general advice, as server setups differ. Read http://forum.coppermine-gallery.net/index.php?topic=5841.0 for a start to get an idea of the server vars (php.ini). Note that you usually can't configure those server options when webhsoted, so you'll probably have to ask your webhost for support, find a better webhost or upload only files with lower dimensions.

pcexhaust

I agree that the problem is due to the resolution of the file.  The link you gave me (which I read before this post) talks about vars for file sizes and not for lenthxwidth entries.  Am I missing something in my reading?

I do realize that I cannot modify the php.ini file of my host.  I just would like to know whats wrong so I can e-mail NetworkSolutions and see if I can get something worked out.

UPDATE:

So all the sudden, these same files that wouldn't upload correctly before are now partically working.  When you first upload the file the thumbnail, where you put details about the image, that thumbnail doesn't show up.... but once you go back to the albums the image shows up (this used to not happen).

I guess I can live with the initial thumbnail not showing up. I'm glad its working now... though I did nothing to make it work.

Joachim Müller

sounds like you just don't have enough memory, ask your webhost to increase "memory_limit" for you: the more, the better (for you, not for your webhost ;)). 8 MB is default, which is often not enough for larger dimensions, as the memory needed to create a thumbnail file for a 1024x768 pic isn't just twice as much as for a 512x384 pic, but more than 4 times more. Ask them to increase it to 16 MB at least.