Quoting Jani Taskinen <jani.taski...@sci.fi>:

Yes. You shouldn't really do it like that. Unpack it in separate
directory. And build outside the sources:

# tar zxfv php5.2-xxxxx.tar.gz
# mkdir php_5_2
# cd php_5_2
# ../php5.2-xxxxx/configure --disable-all --enable-debug <and the rest
of relevant options here>
# make
# make install

I couldn't get the direct SVN checkout to compile so I compiled the latest SNAP as above with the same result with the previous gdb.

Again the segmentation fault occurs when an .htaccess is defined with an error_log and the custom_open_base_check is introduced that does a DOCUMENT_ROOT lookup. In PHP 5.2.6 this worked without issue. I have noticed the problem is intermittent i.e. it fails about 9/10 times.

My questions are:

1. Is it safe to lookup the DOCUMENT_ROOT in fopen_wrappers. If not is there an alternative?

2. Why was this working in PHP 5.2.6 but now broken in 5.2.1x?

3. Is the problem related to Zend doing something it shouldn't?

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fd8fa117750 (LWP 20693)]
0x00007fd8f432b04f in _zend_is_inconsistent (ht=0x5a5a5a5a5a5a5a5a, file=0x7fd8f4649ea8 "/usr/local/src/php5.2-200908040030/Zend/zend_hash.c", line=875)
    at /usr/local/src/php5.2-200908040030/Zend/zend_hash.c:53
53 /usr/local/src/php5.2-200908040030/Zend/zend_hash.c: No such file or directory.
        in /usr/local/src/php5.2-200908040030/Zend/zend_hash.c
(gdb) bt
#0 0x00007fd8f432b04f in _zend_is_inconsistent (ht=0x5a5a5a5a5a5a5a5a, file=0x7fd8f4649ea8 "/usr/local/src/php5.2-200908040030/Zend/zend_hash.c", line=875)
    at /usr/local/src/php5.2-200908040030/Zend/zend_hash.c:53
#1 0x00007fd8f432ddd7 in zend_hash_find (ht=0x5a5a5a5a5a5a5a5a, arKey=0x7fd8f462d0f0 "DOCUMENT_ROOT", nKeyLength=14, pData=0x7fff0211e188)
    at /usr/local/src/php5.2-200908040030/Zend/zend_hash.c:875
#2 0x00007fd8f42c55b0 in custom_open_base_check (basedir=0x3d4f990 "VIRTUAL_DOCUMENT_ROOT", resolved_name=0x7fff02122290 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log")
    at /usr/local/src/php5.2-200908040030/main/fopen_wrappers.c:709
#3 0x00007fd8f42c3f95 in php_check_specific_open_basedir (basedir=0x3d4f990 "VIRTUAL_DOCUMENT_ROOT", path=0x3d4f908 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log")
    at /usr/local/src/php5.2-200908040030/main/fopen_wrappers.c:118
#4 0x00007fd8f42c43ad in php_check_open_basedir_ex (path=0x3d4f908 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log", warn=1)
    at /usr/local/src/php5.2-200908040030/main/fopen_wrappers.c:249
#5 0x00007fd8f42c4303 in php_check_open_basedir (path=0x3d4f908 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log") at /usr/local/src/php5.2-200908040030/main/fopen_wrappers.c:225 #6 0x00007fd8f42b9f44 in OnUpdateErrorLog (entry=0x3bfe8a0, new_value=0x3d4f908 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log", new_value_length=47, mh_arg1=0x68, mh_arg2=0x7fd8f498db80, mh_arg3=0x0, stage=32) at /usr/local/src/php5.2-200908040030/main/main.c:317 #7 0x00007fd8f433804e in zend_alter_ini_entry_ex (name=0x3dab150 "error_log", name_length=10, new_value=0x3da1480 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log", new_value_length=47, modify_type=2, stage=32, force_change=0) at /usr/local/src/php5.2-200908040030/Zend/zend_ini.c:293 #8 0x00007fd8f4337e24 in zend_alter_ini_entry (name=0x3dab150 "error_log", name_length=10, new_value=0x3da1480 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log", new_value_length=47, modify_type=2, stage=32) at /usr/local/src/php5.2-200908040030/Zend/zend_ini.c:248 #9 0x00007fd8f43aaa22 in apply_config (dummy=0x3da2610) at /usr/local/src/php5.2-200908040030/sapi/apache2handler/apache_config.c:195 #10 0x00007fd8f43a9c69 in php_handler (r=0x3dafda8) at /usr/local/src/php5.2-200908040030/sapi/apache2handler/sapi_apache2.c:531
#11 0x0000000000436633 in ap_run_handler ()
#12 0x0000000000439511 in ap_invoke_handler ()
#13 0x00000000004430b4 in ap_process_request ()
#14 0x0000000000440706 in ?? ()
#15 0x000000000043ceb4 in ap_run_process_connection ()
#16 0x0000000000446db7 in ?? ()
#17 0x0000000000447012 in ?? ()
#18 0x00000000004470ac in ?? ()
#19 0x0000000000447cc8 in ap_mpm_run ()
#20 0x0000000000425ab3 in main ()



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to