Advanced search  

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

Pages: [1]   Go Down

Author Topic: Error on upload  (Read 3544 times)

0 Members and 1 Guest are viewing this topic.

DVD Dan

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Error on upload
« on: December 22, 2003, 08:18:52 pm »

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.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Error on upload
« Reply #1 on: December 22, 2003, 08:35:11 pm »

Have you tried with more than one pic, known to be good?
Logged
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

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Error on upload
« Reply #2 on: December 23, 2003, 01:25:38 am »

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.
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

DVD Dan

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Error on upload
« Reply #3 on: December 23, 2003, 09:47:20 am »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Error on upload
« Reply #4 on: December 23, 2003, 10:54:45 am »

try running the test scripts mentioned in http://forum.coppermine-gallery.net/index.php?topic=503

GauGau
Logged

DVD Dan

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Error on upload
« Reply #5 on: December 23, 2003, 04:31:26 pm »

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
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Error on upload
« Reply #6 on: December 23, 2003, 06:56:25 pm »

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.
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 16 queries.