php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #322 Header function works not correctly if include file contains trailing lines
Submitted: 1998-04-28 07:29 UTC Modified: 1998-04-28 11:29 UTC
From: andreas dot schmitter at swisslife dot ch Assigned:
Status: Closed Package: Other
PHP Version: 3.0 Release Candidate 4 OS: AIX
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: andreas dot schmitter at swisslife dot ch
New email:
PHP Version: OS:

 

 [1998-04-28 07:29 UTC] andreas dot schmitter at swisslife dot ch
Description:
If an include file contains a trailing line the 
function header("Location: xyz.html") does not redirect
to the page xyz.htm
--------------------------------------------------------
test.php3
<?
include("./globals.inc");
$str=" xxx ";
$x=remove_spaces($x);
header("Location: xyz.html");
?>
--------------------------------------------------------
globals.inc:
<?
function remove_spaces($str) {
	$str=ereg_replace("^ *","_",$str);
        $str=ereg_replace(" +$","_",$str);
	return $str;
}
?>

------------------------------------------------------
./configure --with-apache=/u/users/zue/src/apache_1.2.6_php3 --with-oracle=/home
/oracle/product/7.3.2.2 --with-config-file-path=/u/users/zue/www/httpd_8083/etc
--enable-debug=no
-------------------------------------------------------
Additional Oracle Support (sql-based interface)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-28 11:29 UTC] zeev
Whitespace outside PHP blocks will be considered
as HTML, which will trigger the sending of the HTTP
header.  After the HTTP header is sent, the Header()
function can no longer be used.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 15:01:56 2024 UTC