#39923 [Bgs]: Undefined constants IMG_PNG, IMG_JPG, IMG_GIF
| From: | tony2001@php.net | Date: | Thu, 21 Dec 2006 14:57:12 +0000 |
| Subject: | #39923 [Bgs]: Undefined constants IMG_PNG, IMG_JPG, IMG_GIF | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-106742@lists.php.net to get a copy of this message | ||
ID: 39923
Updated by: tony2001@php.net
Reported By: smlerman at gmail dot com
Status: Bogus
Bug Type: GD related
Operating System: Windows
PHP Version: 5.2.0
New Comment:
This is impossible.
These constants are defined in GD extension and if they are not, then
the extension is missing.
Previous Comments:
------------------------------------------------------------------------
[2006-12-21 14:55:04] smlerman at gmail dot com
Weird, I can't reproduce it now. The original error message was
"[21-Dec-2006 09:13:50] PHP Notice: Use of undefined constant IMG_PNG
- assumed 'IMG_PNG' in...", but all of the images that should be on the
page showed up fine. Might have been a glitch with the 5.2.0 upgrade
process. I'll reopen if I manage to reproduce.
------------------------------------------------------------------------
[2006-12-21 14:42:36] smlerman at gmail dot com
Nope, GD is enabled and working fine.
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
(Sorry about the summary. Browser must have auto-filled it without my
noticing)
------------------------------------------------------------------------
[2006-12-21 14:35:32] tony2001@php.net
IMG_* constants are defined in GD which is obviously not enabled in
your installation.
------------------------------------------------------------------------
[2006-12-21 14:33:21] smlerman at gmail dot com
Description:
------------
The constants IMG_PNG, IMG_JPG, and IMG_GIF are reported as undefined.
IMAGETYPE_PNG, IMAGETYPE_JPEG, and IMAGETYPE_GIF all work fine. If the
IMG_ constants were removed intentionally in favor of the IMAGETYPE_
constants, this is just a documentation issue.
Reproduce code:
---------------
<?php
echo IMG_PNG . "\n";
echo IMG_JPG . "\n";
echo IMG_GIF . "\n";
echo IMAGETYPE_PNG . "\n";
echo IMAGETYPE_JPEG . "\n";
echo IMAGETYPE_GIF . "\n";
?>
Expected result:
----------------
3
2
1
3
2
1
Actual result:
--------------
Notice: Use of undefined constant IMG_PNG - assumed 'IMG_PNG' in
test.php on line 3
IMG_PNG
Notice: Use of undefined constant IMG_JPG - assumed 'IMG_JPG' in
test.php on line 4
IMG_JPG
Notice: Use of undefined constant IMG_GIF - assumed 'IMG_GIF' in
test.php on line 5
IMG_GIF
3
2
1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39923&edit=1