Bug #17664 Updated: Compiling with GD > 1.6 cause GIF problems
| From: | rasmus@php.net | Date: | Sun, 09 Jun 2002 11:56:48 +0000 |
| Subject: | Bug #17664 Updated: Compiling with GD > 1.6 cause GIF problems | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9917@lists.php.net to get a copy of this message | ||
ID: 17664
Updated by: rasmus@php.net
Reported By: davey@its-explosive.net
Status: Bogus
Bug Type: GD related
Operating System: *nix
PHP Version: 4.2.1
New Comment:
Well, your patch still makes no sense. gd-1.6 and higher can still
have gif support via the patches you can find at
http://www.rime.com.au/gd/gd.html so simply
disabling it is a very bad
idea.
Previous Comments:
------------------------------------------------------------------------
[2002-06-09 07:26:27] davey@its-explosive.net
Rasmus:
What if people have that library (libgd.[a|so] version 1.3) for other
uses? I'm sure people do, although I don't know what other uses it has
personally as I don't use it for anything else that I know of, I'm sure
there is more that using it with PHP, thats something you need to cater
for IMO... perhaps I'm way outta line, I don't know.
Nice fast response ... I like it :)
- Davey
------------------------------------------------------------------------
[2002-06-09 07:23:39] davey@its-explosive.net
So you know the changes I made:
http://www.its-explosive.net/~davey/gd.diff.php
------------------------------------------------------------------------
[2002-06-09 07:06:28] rasmus@php.net
This makes very little sense. The Gif stuff will only be enabled if
the libgd that PHP finds contains the Gif functions. Read the
config.m4 file to see the checks. If it is getting enabled for you, it
probably means that you have a libgd.[a|so] version 1.3 or older
floating around on your system and that is what PHP is finding.
------------------------------------------------------------------------
[2002-06-09 06:54:14] davey@its-explosive.net
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 this bug report at http://bugs.php.net/?id=17664&edit=1