From:             cristic at interaktonline dot com
Operating system: Windows XP
PHP version:      5.1.1
PHP Bug Type:     Reproducible crash
Bug description:  virtual() and header('Location:') crash Apache

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 bug report at http://bugs.php.net/?id=35940&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35940&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35940&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35940&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35940&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35940&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35940&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35940&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35940&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35940&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35940&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35940&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35940&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35940&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35940&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35940&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35940&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35940&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35940&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35940&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35940&r=mysqlcfg

Reply via email to