|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-14 01:53 UTC] dave at socrates dot thinkhost dot com
I built a new PHP DSO and CGI for one of our FreeBSD machines. The odd thing is that the "same" (built with the same configure command) CGI binary works on a similar machine without error. The PHP CGI works fine when called from the shell, but dies and dumps a core when called by suexec (apache). A back trace of the core dump is included below: ================================================ Core was generated by `php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libcrypt.so.2...done. Reading symbols from /usr/local/lib/libmcal.so...done. Reading symbols from /usr/local/lib/libc-client4.so.8...done. Reading symbols from /usr/local/lib/libssl.so.4...done. Reading symbols from /usr/local/lib/libcrypto.so.4...done. Reading symbols from /usr/local/lib/libexpat.so.4...done. Reading symbols from /usr/local/lib/libpq.so.2...done. Reading symbols from /usr/local/lib/libpdf.so.4...done. Reading symbols from /usr/lib/libm.so.2...done. Reading symbols from /usr/lib/libz.so.2...done. Reading symbols from /usr/local/lib/libtiff.so.4...done. Reading symbols from /usr/local/lib/libpng.so.5...done. Reading symbols from /usr/local/lib/libjpeg.so.9...done. Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.10...done. Reading symbols from /usr/local/lib/libming.so.3...done. Reading symbols from /usr/local/lib/libmhash.so.2...done. Reading symbols from /usr/local/lib/libmcrypt.so.8...done. Reading symbols from /usr/local/lib/libltdl.so.1...done. Reading symbols from /usr/local/lib/libldap.so.2...done. Reading symbols from /usr/local/lib/liblber.so.2...done. Reading symbols from /usr/lib/libpam.so.1...done. Reading symbols from /usr/local/lib/libiconv.so.3...done. Reading symbols from /usr/local/lib/libintl.so.4...done. Reading symbols from /usr/local/lib/libgd.so.2...done. Reading symbols from /usr/local/lib/libfreetype.so.9...done. Reading symbols from /usr/local/lib/libcurl.so.2...done. Reading symbols from /usr/local/lib/libxml2.so.5...done. Reading symbols from /usr/lib/libc.so.4...done. Reading symbols from /usr/lib/libssl.so.3...done. Reading symbols from /usr/lib/libcrypto.so.3...done. Reading symbols from /usr/local/lib/libssl.so.3...done. Reading symbols from /usr/local/lib/libcrypto.so.3...done. Reading symbols from /usr/libexec/ld-elf.so.1...done. #0 0x8176b76 in _estrdup (s=0x0) at /usr/local/src/php-4.3.2RC1/Zend/zend_alloc.c:337 337 length = strlen(s)+1; PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 07:00:01 2025 UTC |
> Also: > /path/to/cgibinary/php -f /path/to/phpinfo.php As I already mentioned, it works fine from the shell, this problem only occurs when the execution is called by suexec. I can call the script directly (since it has executable perms) like so: ./info.php and like so: /usr/local/bin/php -f ./info.php both work fine, but not when called by suexec (Apache). > Can you type the following in gdb: > frame 2 > followed by: > info local (gdb) bt #0 0x81901de in _estrdup (s=0x0) at /usr/local/src/php-4.3.2RC2/Zend/zend_alloc.c:363 #1 0x81b24e5 in init_request_info () at /usr/local/src/php-4.3.2RC2/sapi/cgi/cgi_main.c:709 #2 0x81b2b57 in main (argc=30, argv=0xbfbff4e8) at /usr/local/src/php-4.3.2RC2/sapi/cgi/cgi_main.c:1238 #3 0x808cb56 in _start () (gdb) frame 2 #2 0x81b2b57 in main (argc=30, argv=0xbfbff4e8) at /usr/local/src/php-4.3.2RC2/sapi/cgi/cgi_main.c:1238 1238 init_request_info(TSRMLS_C); (gdb) info local orig_bailout = {{_jb = {0 <repeats 12 times>}}} exit_status = 0 cgi = 1 c = 0 i = 30 len = 137233484 file_handle = {type = 100 'd', filename = 0xbfbff4e8 "D???I???R???e???\210???\032???=???X???s???\220???????7???K???r???\221???????????????\005???*???M???\\???????0???N???h???\201???\224???????????", opened_path = 0x0, handle = {fd = 674015744, fp = 0x282caa00}, free_filename = 224 '?'} retval = -1 s = 0x82e044c "?\a" behavior = 1 no_headers = 0 orig_optind = 1 orig_optarg = 0x0 script_file = 0x0 global_vars = {head = 0x282b0aab, tail = 0x282c9240, size = 0, count = 3217028236, dtor = 0x282b0a47 <_rtld_bind+59>, persistent = 30 '\036', traverse_ptr = 0xbfbff4e8} (gdb) This is strange, it doesn't occur on any of the other production machines at work (which are all 4.8-STABLE as well). It also works fine on my personal server (4.8-RC). However, I can get it to work on the "problem" machine when I compile from the 4.3.1 or earlier source tree.