From: drigolin at iol dot it
Operating system: Windows 2000 Server
PHP version: 4.3.1
PHP Bug Type: Output Control
Bug description: exec() interferes with header()
Using this code:
<?php
exec("online.bat param1");
header("Location:http://myserver/mypage.php");
exit;
?>
my browsers (IE and Mozilla) instead of do a redirect they display this
message:
Status: 302
Content-type: text/html
X-Powered-By: PHP/4.3.1
Location:http://myserver/mypage.php
That is the full "dump" of the HTTP header of a Redirect (302) but it
seems that exec() put into output stream any char that causes browsers to
misunderstand the header and consider it an "raw text output".
Commenting exec or calling other function makes the script working
correctly and the browser works ok.
Best regards.
P.S.: PHP is working as CGI on Netscape iPlanet Web Server.
--
Edit bug report at http://bugs.php.net/?id=23949&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23949&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23949&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23949&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23949&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23949&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23949&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23949&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23949&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23949&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23949&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23949&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23949&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23949&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23949&r=gnused