Error on upload Error on upload
 

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

Error on upload

Started by DVD Dan, December 22, 2003, 08:18:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DVD Dan

Fresh Newbie install, when I upload picture I get this error:

When using the GD image library allowed image types are only JPEG and PNG.

File: /home/www/landofdan/gallery/db_input.php - Line: 279



Parse error: parse error in /home/www/landofdan/gallery/include/picmgmt.inc.php on line 198

Warning: Use of undefined constant GIS_JPG - assumed 'GIS_JPG' in /home/www/landofdan/gallery/db_input.php on line 277

Warning: Use of undefined constant GIS_PNG - assumed 'GIS_PNG' in /home/www/landofdan/gallery/db_input.php on line 277

And yes I'm uploading a jpg and I'm configured for GD version 1.x

I ran the test script for image creation found elsewhere on this board and it worked.

PHP info reports:
PHP version 4.0.6

gd
GD Support enabled
GD Version 1.6.2 or higher
JPG Support enabled
PNG Support enabled
WBMP Support enabled

any help would be appreciated.

Casper

Have you tried with more than one pic, known to be good?
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

hyperion

Basically, GD doesn't recognize the pic as a JPEG or PNG.  If the picture is good, check the color.  Standard GD library support for JPEG is RGB; a second library is required for CMYK(sp?) JPEG.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

DVD Dan

I've tried several good jpegs and a PNG with the same results.

As far as JPEG RGB vs. JPEG CMYK, I must admit I didn't know there were different type of JPEGS. I can't even figure out how to check. I assume mine are RGB as that is how my pallets are displayed in PSP and I don't see where I have to option to save a particular format.

Joachim Müller


DVD Dan

I'd already run the image creation script and it worked, the second "Yes its here" works as well.

More careful reading of that thread suggests reinstalling CPG, is that what I should try next?

thanks

hyperion

No, the thread suggested reinstalling GD. Coppermine is not generating this error, it is simply reporting what PHP has to say about the validity of the picture.

I would do the following:

1. Go to demo and save one of the large pics from it. Then try to upload that picture to your gallery.  If it fails, we will definitely know this is a server issue, and not a client encoding issue.

2. In any event, upgrade PHP to the most recent version if possible. You are many versions behind, and there have been many bug fixes for this function since then. While you're at it, take the time to upgrade to GD2, unless you are keeping GD1 for its GIF creation. The lateset PHP/GD has returned support for reading GIF, so you could convert to PNG if you use GD for other applications. But don't worry about changing GD if you don't have time.  

3. If the problem continues with PHP 4.3.4, you might also check the bug list at www.php.net to see if your issue is related to any of the bug reports for getimagesize().

http://bugs.php.net/search.php?search_for=getimagesize&boolean=0&limit=10&order_by=&direction=ASC&cmd=display&status=All&php_os=&phpver=&assign=&author_email=&bug_age=0

I have a feeling that this is most likely an encoding issue, and an up to date function might cure the problem. However, this is the first report of this type of behavior we have seen on this forum, so please understand this is a guess.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)