#20069 [NEW]: GD 2.0.4 support broken in PHP 4.2.3, 4.3.x (maybe all)
| From: | matt at rp6 dot net | Date: | Thu, 24 Oct 2002 18:36:49 +0000 |
| Subject: | #20069 [NEW]: GD 2.0.4 support broken in PHP 4.2.3, 4.3.x (maybe all) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-23222@lists.php.net to get a copy of this message | ||
From: matt@rp6.net
Operating system: GNU/Linux 2.4.19
PHP version: 4.2.3
PHP Bug Type: Compile Failure
Bug description: GD 2.0.4 support broken in PHP 4.2.3, 4.3.x (maybe all)
Compile Reproduction
--------------------
Compile with GD 2.0.4
Will fail out with:
---
In file included from gd.c:83:
gd_ctx.c: In function `_php_image_output_ctx':
gd_ctx.c:70: structure has no member named `free'
gd_ctx.c:98: structure has no member named `free'
gd.c: In function `_php_image_type':
gd.c:1014: structure has no member named `free'
gd.c:1017: structure has no member named `free'
gd.c: In function `_php_image_create_from':
gd.c:1209: structure has no member named `free'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory
`/home/pub/system/daemons/apache/24102002/mods/php-4.2.3/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/pub/system/daemons/apache/24102002/mods/php-4.2.3/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/pub/system/daemons/apache/24102002/mods/php-4.2.3/ext'
make: *** [all-recursive] Error 1
---
Compile arguments
-----------------
./configure --with-apache=../../apache_1.3.27 --enable-track-var
--with-mysql --with-gd=/usr/local --with-jpeg-dir=/usr/local
--with-zlib --with-zlib-dir=/usr/local --with-png-dir=/usr/local
DIFFs
-----
#
diff ext/gd/gd.c ext/gd/gd.c-4.2.3:
1014c1014
< io_ctx->gd_free(io_ctx);
---
> io_ctx->free(io_ctx);
1017c1017
< io_ctx->gd_free(io_ctx);
---
> io_ctx->free(io_ctx);
1209c1209
< io_ctx->gd_free(io_ctx);
---
> io_ctx->free(io_ctx);
# diff ext/gd/gd_ctx.c ext/gd/gd_ctx.c-4.2.3
70c70
< ctx->gd_free = _php_image_output_ctxfree;
---
> ctx->free = _php_image_output_ctxfree;
98c98
< ctx->gd_free(ctx);
---
> ctx->free(ctx);
Solution
--------
The diff changes allowed the compile to go through. Apparently, the
method free() was renamed to gd_free().
--
Edit bug report at http://bugs.php.net/?id=20069&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20069&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20069&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20069&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20069&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20069&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20069&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20069&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20069&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20069&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20069&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20069&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20069&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20069&r=isapi