Bug #14444: PHP (Apache DSO) crashes on startup
| From: | fmajid at kefta dot com | Date: | Wed, 12 Dec 2001 02:15:13 +0000 |
| Subject: | Bug #14444: PHP (Apache DSO) crashes on startup | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-73203@lists.php.net to get a copy of this message | ||
From: fmajid@kefta.com
Operating system: Solaris 8 Intel MU6
PHP version: 4.1.0
PHP Bug Type: Dynamic loading
Bug description: PHP (Apache DSO) crashes on startup
When PHP 4.1.0 is compiled on Solaris 8 x86 with gcc 2.95.3 (Solaris ld,
GNU as) with GD 1.5 (for GIF support), it seg faults on Apache startup. A
backtrace with GDB shows the seg fault occurs in dlerror() during
initialization of libthread.so.
Setting LD_PRELOAD to preload libthread.so makes the seg fault go away, but
now I get the message:
Cannot load /usr/local/apache/libexec/libphp4.so into server: ld.so.1:
/usr/local/apache/bin/httpd: fatal: relocation error: file
/usr/local/apache/libexec/libphp4.so: symbol gdImageColorResolve:
referenced symbol not found
I managed to resolve the problem by applying the following patch to
ext/gd/php_gd.h:
*** php_gd.h~ Fri Aug 24 13:07:07 2001
--- php_gd.h Tue Dec 11 17:42:38 2001
***************
*** 66,72 ****
PHP_MSHUTDOWN_FUNCTION(gd);
#ifndef HAVE_GDIMAGECOLORRESOLVE
! static int gdImageColorResolve(gdImagePtr, int, int, int);
#endif
PHP_FUNCTION(imagearc);
PHP_FUNCTION(imagechar);
--- 66,72 ----
PHP_MSHUTDOWN_FUNCTION(gd);
#ifndef HAVE_GDIMAGECOLORRESOLVE
! extern int gdImageColorResolve(gdImagePtr, int, int, int);
#endif
PHP_FUNCTION(imagearc);
PHP_FUNCTION(imagechar);
--
Edit bug report at: http://bugs.php.net/?id=14444&edit=1