ID: 35264 User updated by: maddog2k at maddog2k dot net Reported By: maddog2k at maddog2k dot net Status: Open Bug Type: Apache2 related Operating System: Linux PHP Version: 4.4.1 New Comment:
(Nevermind the different path shown in the output, it's a 2nd test-site) Previous Comments: ------------------------------------------------------------------------ [2005-11-17 15:58:22] maddog2k at maddog2k dot net No segfault (as of yet), but still the safe mode errors show, that aren't there in <= 4.4.0 This is snapshot php5-200511171330 Warning: Unknown: SAFE MODE Restriction in effect. The script whose uid is 3185 is not allowed to access /opt/guide/www.deventerijsclub.nl/HTML/content/langebaan/uitslagen/t1.php owned by uid 1027 in Unknown on line 0 Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 Warning: Unknown: Failed opening '/opt/guide/www.deventerijsclub.nl/HTML/content/langebaan/uitslagen/t1.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in Unknown on line 0 ------------------------------------------------------------------------ [2005-11-17 15:27:25] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-11-17 15:26:48] maddog2k at maddog2k dot net Description: ------------ This is somewhat a copy of bug #35029 (segmentation faults with multiple include virtual requests). The problem here is that at least with php4-STABLE-200511160748 (combined with at least Apache 2.0.54/.55) either it segfaults or a safe_mode error pops up. This has worked in PHP 4.4.0 and below with same Apache-versions... Here are the conditions: .shtml page with 1 or more .php includes : OK .shtml page with 1 or more .html includes : OK .shtml page with 1 or more .php includes and 1 or more .html includes : ERROR, but ONLY if the .html appears as first include (thus before the first .php include). If the .html is placed after the first .php include, no errors show (see: Actual result) However, if I place a .cgi above the first .php, no problem occurs either for some strange reason. Also, the UID mentioned by the PHP message occasionaly differs, and is NEVER the actual UID... looks like some process mixup or so. (UID 978 mentioned changes sometimes, and UID 1027 is the actual UID). But, as mentioned, you don't get PHP warning but the Apache child process just exists with Segmentation fault (11). Tried this on a lot (> 10) of machines. Reproduce code: --------------- test.shtml: <html> <body> <!--#include virtual="/t1.html" --> <!--#include virtual="/t1.php" --> <!-- optionally more virtuals //--> </body> </html> t1.html: <pre>TEST1-HTML</pre> <br> t1.php: <?php print "TEST1-PHP\n<br>\n"; ?> Expected result: ---------------- <html> <body> OUTPUT_OF: /t1.html OUTPUT_OF: /t1.php </body> </html> Actual result: -------------- <html> <body> OUTPUT OF: /t1.html Warning: Unknown(): SAFE MODE Restriction in effect. The script whose uid is 978 is not allowed to access /opt/guide/www.some-domain.nl/HTML/t1.php owned by uid 1027 in Unknown on line 0 Warning: Unknown/opt/guide/www.some-domain.nl/HTML/t1.php): failed to open stream: No such file or directory in Unknown on line 0 Warning: Unknown(): SAFE MODE Restriction in effect. The script whose uid is 978 is not allowed to access /opt/guide/www.some-domain.nl/HTML/t1.php owned by uid 1027 in Unknown on line 0 Warning: Unknown(/opt/guide/www.some-domain.nl/HTML/t1.php): failed to open stream: No such file or directory in Unknown on line 0 Warning: (null)(): Failed opening '/opt/guide/www.some-domain.nl/HTML/t1.php' for inclusion (include_path='.:/usr/local/php4/lib/php') in Unknown on line 0 --- With segfault: [Thu Nov 17 15:22:57 2005] [notice] child pid 20071 exit signal Segmentation fault (11) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35264&edit=1