ID: 47812
Updated by: [email protected]
Reported By: oeriksson at mandriva dot com
-Status: Open
+Status: Assigned
Bug Type: GD related
Operating System: Mandriva Linux
PHP Version: 5.3.0RC1
-Assigned To:
+Assigned To: pajoye
New Comment:
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' :)
Previous Comments:
------------------------------------------------------------------------
[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] [email protected]
Are you using the bundled libgd, or an external one?
------------------------------------------------------------------------
[2009-03-27 19:16:37] oeriksson at mandriva dot com
Description:
------------
I get an unresolved symbol when linking against system libgd.
Reproduce code:
---------------
Just running php-cli
Expected result:
----------------
Should work.
Actual result:
--------------
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib64/php/extensions/gd.so' - /usr/lib64/php/extensions/gd.so:
undefined symbol: gdJpegGetVersionInt in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47812&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.