php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14444 PHP (Apache DSO) crashes on startup
Submitted: 2001-12-11 21:15 UTC Modified: 2002-06-18 19:04 UTC
From: fmajid at kefta dot com Assigned:
Status: Closed Package: GD related
PHP Version: 4.1.0 OS: Solaris 8 Intel MU6
Private report: No CVE-ID: None
 [2001-12-11 21:15 UTC] fmajid at kefta dot com
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);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-07 08:50 UTC] lobbin@php.net
Duplicate of #14426
 [2002-06-18 19:04 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Nov 30 03:03:45 2022 UTC