ID: 47812 Updated by: paj...@php.net Reported By: oeriksson at mandriva dot com Status: Assigned Bug Type: GD related Operating System: Mandriva Linux PHP Version: 5.3.0RC1 Assigned To: pajoye New Comment:
You missed my point. These distributions do not have updated libraries, or even worst for debian, they break the compatibility with the normal GD. I'm working to sync the external gd and php's gd so both can be used smoothly, but I have serious doubts that Debian will change, for example. Previous Comments: ------------------------------------------------------------------------ [2009-03-27 20:04:23] ras...@php.net That argument completely falls apart if you do a bit of research on who the upstream for the gd library is. ------------------------------------------------------------------------ [2009-03-27 19:59:07] oeriksson at mandriva dot com The PHP devs should try harder to not bundle common libraries and instead push private changes upstream (IMHO). ------------------------------------------------------------------------ [2009-03-27 19:49:27] paj...@php.net You should really not use the system libgd, especially not on the following systems: - debian - RHEL - Centos The problem still has to be fixed tho' :) ------------------------------------------------------------------------ [2009-03-27 19:45:31] oeriksson at mandriva dot com I described it in "Description:" :-) Here's a proposed fix: --- ext/gd/gd.c 2009-01-31 16:27:52.000000000 +0100 +++ ext/gd/gd.c.oden 2009-03-27 20:27:14.000000000 +0100 @@ -55,6 +55,15 @@ #if HAVE_LIBGD +#ifdef HAVE_GD_PNG +/* needs to be first */ +# include <png.h> +#endif + +#ifdef HAVE_GD_JPG +# include <jpeglib.h> +#endif + static int le_gd, le_gd_font; #if HAVE_LIBT1 #include <t1lib.h> @@ -1293,8 +1302,13 @@ PHP_MINFO_FUNCTION(gd) #endif #ifdef HAVE_GD_JPG { +#if HAVE_GD_BUNDLED char tmp[12]; snprintf(tmp, sizeof(tmp), "%d", gdJpegGetVersionInt()); +#else + char tmp[256]; + snprintf(tmp, sizeof(tmp), "%d", JPEG_LIB_VERSION); +#endif php_info_print_table_row(2, "JPG Support", "enabled"); php_info_print_table_row(2, "libJPEG Version", tmp); } @@ -1302,7 +1316,11 @@ PHP_MINFO_FUNCTION(gd) #ifdef HAVE_GD_PNG php_info_print_table_row(2, "PNG Support", "enabled"); +#if HAVE_GD_BUNDLED php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString()); +#else + php_info_print_table_row(2, "libPNG Version", PNG_LIBPNG_VER_STRING); +#endif #endif #ifdef HAVE_GD_WBMP php_info_print_table_row(2, "WBMP Support", "enabled"); ------------------------------------------------------------------------ [2009-03-27 19:36:56] der...@php.net Are you using the bundled libgd, or an external one? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/47812 -- Edit this bug report at http://bugs.php.net/?id=47812&edit=1