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.
Have you tried with more than one pic, known to be good?
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.
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.
try running the test scripts mentioned in http://forum.coppermine-gallery.net/index.php?topic=503
GauGau
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
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.