#35940 [Fbk->Opn]: virtual() and header('Location:') crash Apache
| From: | cristic at interaktonline dot com | Date: | Tue, 10 Jan 2006 15:59:11 +0000 |
| Subject: | #35940 [Fbk->Opn]: virtual() and header('Location:') crash Apache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-91742@lists.php.net to get a copy of this message | ||
ID: 35940
User updated by: cristic at interaktonline dot com
Reported By: cristic at interaktonline dot com
-Status: Feedback
+Status: Open
Bug Type: Apache related
Operating System: Windows XP
PHP Version: 5.1.1
New Comment:
OK, I installed a new machine from scratch:
Windows XP Home SP2
Apache 1.3.34
PHP Version 5.1.2RC3-dev ( Build Date Jan 9 2006 12:14:14)
The PHP is installed as ISAPI:
httpd.conf:
LoadModule php5_module "C:/php5/php5apache.dll"
AddModule mod_php5.c
AddType application/x-httpd-php .php
php.ini changes over php.ini-distribution:
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = On
allow_call_time_pass_reference = Off
error_reporting = E_ALL
log_errors = On
variables_order = "GPCS"
register_long_arrays = Off
register_argc_argv = Off
default_charset = "iso-8859-1"
extension_dir = "c:/php5/ext"
extension=php_mbstring.dll
extension=php_bz2.dll
extension=php_gd2.dll
extension=php_mysql.dll
extension=php_sqlite.dll
extension=php_xsl.dll
session.save_path = "C:\Windows\Temp"
session.gc_divisor = 1000
session.bug_compat_42 = 0
session.hash_bits_per_character = 5
url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=fakeentry"
When calling into the browser (IE 6.0) http://localhost/a.php
the
Apache crash:
Error signature:
szAppName : Apache.exe szAppVer : 0.0.0.0 szModName :
php5ts.dll
szModVer : 5.1.2.2 offset : 00096d6c
The following files will be included into this report:
C:\DOCUME~1\dbarascu\LOCALS~1\Temp\WERA2.tmp.dir00\Apache.exe.mdmp
C:\DOCUME~1\dbarascu\LOCALS~1\Temp\WERA2.tmp.dir00\appcompat.txt
If you want I may provide you a link to these 2 files as well if is
needed.
Previous Comments:
------------------------------------------------------------------------
[2006-01-09 12:51:28] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
This is most likely fixed in CVS already.
------------------------------------------------------------------------
[2006-01-09 10:55:06] cristic at interaktonline dot com
Description:
------------
When a redirect (header('Location:')) is used with a virtual include
the Apache crash:
---------------------------
Apache.exe - Application Error
---------------------------
The instruction at "0x008736ac" referenced memory at "0x0001ee6c". The
memory could not be "read".
Click on OK to terminate the program
Click on CANCEL to debug the program
---------------------------
OK Cancel
---------------------------
Reproduce code:
---------------
a.php:
<?php virtual(/b.php);?>
<?php header('Location: http://server.com/c.php');?>
b.php:
<?php ?>
c.php:
<?php phpinfo(); ?>
Expected result:
----------------
When doing this I just expect to be redirected to the c.php.
Actual result:
--------------
1. Windows XP and Apache/1.3.33(Win32):
---------------------------
Apache.exe - Application Error
---------------------------
The instruction at "0x008736ac" referenced memory at "0x0001ee6c". The
memory could not be "read".
Click on OK to terminate the program
Click on CANCEL to debug the program
---------------------------
OK Cancel
---------------------------
The php.ini differences with php.ini-dist:
short_open_tag = Off
output_buffering = 65535
output_handler = ob_gzhandler
allow_call_time_pass_reference = Off
memory_limit = 100M
error_reporting = E_ALL
log_errors = On
error_log = errors_php
register_long_arrays = Off
register_argc_argv = Off
2.Linux Fedora RC 4, Apache 2.0.54:
The Apache is not crashing anymore but the header() is still not
working:
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/a.php:1) in /var/www/html/a.php on
line 0
------------------------------------
The problem I could reproduce on Linux on PHP 4.3.11 as well.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35940&edit=1