Bug #17664: Compiling with GD > 1.6 cause GIF problems
| From: | davey at its-explosive dot net | Date: | Sun, 09 Jun 2002 10:54:16 +0000 |
| Subject: | Bug #17664: Compiling with GD > 1.6 cause GIF problems | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-9910@lists.php.net to get a copy of this message | ||
From: davey@its-explosive.net
Operating system: *nix
PHP version: 4.2.1
PHP Bug Type: GD related
Bug description: Compiling with GD > 1.6 cause GIF problems
When you compile PHP with a higher GD that 1.6 you get errors, these are a
result because of the fact that PHP still tries to setup for gif support
which isn't there. A botched fix this is to comment out offending lines in
gd.c, however a better fix would be for someone who knows more C than me
to write in version checking (if possible) and just not run the GIF setup
stuff... I would also imagine that if you are using 1.6 the PNG stuff
would return errors a similar "fix" would work here too.
This also works on 4.2.0 as gd.c is unchanged as far as I can tell...
(please correct me if I am wrong..)
You can find my hacked up gd.c at
http://www.its-explosive.net/~davey/gd.c.works
You can view my phpinfo() here
http://www.its-explosive.net/~davey/info.php
You can also see GD in action here:
http://www.its-explosive.net/~davey/gd.test.php?do=jpg
and
http://www.its-explosive.net/~davey/gd.test.php?do=png
source:
http://www.its-explosive.net/~davey/gd.test.php?do=src
just to prove it works...
So you know, I used this fix on both 4.2.0 and now 4.2.1 on FreeBSD 4.4-R
with the latest Apache 1.3.x, but you can see all that info in the
phpinfo() :)
If the PHP dev team (or anyone else) would like to see my .c file and see
if they could actually clean out the .gif stuff altogether (as I heard
Rasmus say it's impossible to check between 1.6 and later till 2.x) and
supply two gd.c's like gd.gif.c and gd.c and then you call --enable-gif to
use the .gif one instead of the gd.c one? something like that...
Put simply... this is a bad fix that *does* work. I've heard alot of
people complain about GD and this is the reason.
- Davey
--
Edit bug report at http://bugs.php.net/?id=17664&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17664&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17664&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17664&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17664&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17664&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17664&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17664&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17664&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17664&r=globals