|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
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
If an include file contains a trailing line the 
function header("Location: xyz.html") does not redirect
to the page xyz.htm
$str=" xxx ";
header("Location: xyz.html");
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/ --with-config-file-path=/u/users/zue/www/httpd_8083/etc
Additional Oracle Support (sql-based interface)


Add a Patch

Pull Requests

Add a Pull Request


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: Sun Jul 14 02:01:28 2024 UTC