|  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.
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: Fri May 24 05:01:32 2024 UTC