Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45207 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18963 invoked from network); 4 Aug 2009 02:14:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2009 02:14:49 -0000 Authentication-Results: pb1.pair.com header.from=daniel@zoltak.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=daniel@zoltak.com; spf=permerror; sender-id=softfail Received-SPF: error (pb1.pair.com: domain zoltak.com from 203.16.214.57 cause and error) X-PHP-List-Original-Sender: daniel@zoltak.com X-Host-Fingerprint: 203.16.214.57 ipmail04.adl2.internode.on.net Received: from [203.16.214.57] ([203.16.214.57:39723] helo=ipmail04.adl2.internode.on.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/7F-43528-599977A4 for ; Mon, 03 Aug 2009 22:14:49 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYCAEc2d0qWZZo2/2dsb2JhbACBUpdWukqEGAWBSg X-IronPort-AV: E=Sophos;i="4.43,318,1246804200"; d="scan'208";a="427087195" Received: from ppp154-54.static.internode.on.net (HELO zoltak.com) ([150.101.154.54]) by ipmail04.adl2.internode.on.net with SMTP; 04 Aug 2009 11:44:41 +0930 Received: (qmail 16586 invoked from network); 4 Aug 2009 02:14:41 -0000 Received: from unknown (HELO localhost) (127.0.0.1) by 127.0.0.1 with SMTP; 4 Aug 2009 02:14:41 -0000 Received: from myob.com.au (myob.com.au [203.34.100.2]) by webmail.zoltak.com (Horde MIME library) with HTTP; Tue, 04 Aug 2009 12:14:41 +1000 Message-ID: <20090804121441.wuq024oznoc88c4o@webmail.zoltak.com> Date: Tue, 04 Aug 2009 12:14:41 +1000 To: jani.taskinen@iki.fi, Jani Taskinen Cc: internals@lists.php.net References: <20090731101017.jcs6fiyk0sg4gcok@webmail.zoltak.com> <4A72A254.8030808@sci.fi> <4A7545C4.60202@zoltak.com> <4A75A950.6030701@sci.fi> <4A760126.9070002@lerdorf.com> <4A76199F.9040701@sci.fi> <20090803145207.l09o05kib4ow8448@webmail.zoltak.com> <4A76993F.5000401@sci.fi> <20090803215255.0vh3a3gif4wk8o0w@webmail.zoltak.com> <4A76D3DB.4040106@sci.fi> <20090803221910.mmhi8jy20o48gc00@webmail.zoltak.com> <4A76D997.5090008@sci.fi> In-Reply-To: <4A76D997.5090008@sci.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.6) Subject: Re: [PHP-DEV] fopen_wrappers.c DOCUMENT_ROOT .htaccess error From: daniel@zoltak.com Quoting Jani Taskinen : > 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 of relevant options here> > # make > # make install I couldn't get the direct SVN checkout to compile so I compiled the =20 latest SNAP as above with the same result with the previous gdb. Again the segmentation fault occurs when an .htaccess is defined with =20 an error_log and the custom_open_base_check is introduced that does a =20 DOCUMENT_ROOT lookup. In PHP 5.2.6 this worked without issue. I have =20 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 =20 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=3D0x5a5a5a5a5a5a5a5a, =20 file=3D0x7fd8f4649ea8 =20 "/usr/local/src/php5.2-200908040030/Zend/zend_hash.c", line=3D875) 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 =20 file or directory. in /usr/local/src/php5.2-200908040030/Zend/zend_hash.c (gdb) bt #0 0x00007fd8f432b04f in _zend_is_inconsistent =20 (ht=3D0x5a5a5a5a5a5a5a5a, file=3D0x7fd8f4649ea8 =20 "/usr/local/src/php5.2-200908040030/Zend/zend_hash.c", line=3D875) at /usr/local/src/php5.2-200908040030/Zend/zend_hash.c:53 #1 0x00007fd8f432ddd7 in zend_hash_find (ht=3D0x5a5a5a5a5a5a5a5a, =20 arKey=3D0x7fd8f462d0f0 "DOCUMENT_ROOT", nKeyLength=3D14, =20 pData=3D0x7fff0211e188) at /usr/local/src/php5.2-200908040030/Zend/zend_hash.c:875 #2 0x00007fd8f42c55b0 in custom_open_base_check (basedir=3D0x3d4f990 =20 "VIRTUAL_DOCUMENT_ROOT", resolved_name=3D0x7fff02122290 =20 "/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 =20 (basedir=3D0x3d4f990 "VIRTUAL_DOCUMENT_ROOT", path=3D0x3d4f908 =20 "/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=3D0x3d4f908 =20 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log", warn=3D1) at /usr/local/src/php5.2-200908040030/main/fopen_wrappers.c:249 #5 0x00007fd8f42c4303 in php_check_open_basedir (path=3D0x3d4f908 =20 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log") at =20 /usr/local/src/php5.2-200908040030/main/fopen_wrappers.c:225 #6 0x00007fd8f42b9f44 in OnUpdateErrorLog (entry=3D0x3bfe8a0, =20 new_value=3D0x3d4f908 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log", =20 new_value_length=3D47, mh_arg1=3D0x68, mh_arg2=3D0x7fd8f498db80, mh_arg3=3D0x0, stage=3D32) at =20 /usr/local/src/php5.2-200908040030/main/main.c:317 #7 0x00007fd8f433804e in zend_alter_ini_entry_ex (name=3D0x3dab150 =20 "error_log", name_length=3D10, new_value=3D0x3da1480 =20 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log", new_value_length=3D47, modify_type=3D2, stage=3D32, force_change=3D0) at =20 /usr/local/src/php5.2-200908040030/Zend/zend_ini.c:293 #8 0x00007fd8f4337e24 in zend_alter_ini_entry (name=3D0x3dab150 =20 "error_log", name_length=3D10, new_value=3D0x3da1480 =20 "/home/c-web/cf/4e/tweek.com.au/logs/php_err.log", new_value_length=3D47, modify_type=3D2, stage=3D32) at =20 /usr/local/src/php5.2-200908040030/Zend/zend_ini.c:248 #9 0x00007fd8f43aaa22 in apply_config (dummy=3D0x3da2610) at =20 /usr/local/src/php5.2-200908040030/sapi/apache2handler/apache_config.c:195 #10 0x00007fd8f43a9c69 in php_handler (r=3D0x3dafda8) at =20 /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 ()