|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
11 - 3 = ?
Subscribe to this entry?

 [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 May 19 15:01:31 2024 UTC