|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4013 header function not functions after and if statment
Submitted: 2000-04-03 14:13 UTC Modified: 2005-03-31 16:13 UTC
From: everett at bentonrea dot com Assigned:
Status: Wont fix Package: Misbehaving function
PHP Version: 3.0.14 OS: linux 2.2.5-15smp
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: everett at bentonrea dot com
New email:
PHP Version: OS:


 [2000-04-03 14:13 UTC] everett at bentonrea dot com
Can some one explain this to me?

     $admin_test = admin_user($REMOTE_USER);
     if( !$admin_test ) { header("Location: index.phtml"); exit; }

This is the problem portion of my code.

If I run this code, and the $admin_test is false I get the "Warning Can't display more header info....."  My initial thought was \n or \r in the function, but I have even changed the function to a simple return false; line.

If $admin_test is true, then the page exits, and there is NOTHING that shows up when I do the View Source.

If I remove the if statement, and just run the header function, like so:

     $admin_test = admin_user($REMOTE_USER);
     header("Location: index.phtml");

It works fine and redirects to that correct page.

Any one have any ideas.

Apache 1.3.11
PHP 3.0.14
mod_perl 1.21
mod_auth_mysql 2.20
mysql 3.22.32
gd 1.7.3


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Dec 07 21:03:33 2021 UTC