php.net |  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
 [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; }
     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");
     exit();

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_ssl.5.0
mod_auth_mysql 2.20
mysql 3.22.32
gd 1.7.3

Patches

Pull Requests

History

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 00:01:27 2024 UTC