Bug #4013: header function not functions after and if statment
| From: | everett at bentonrea dot com | Date: | Mon, 03 Apr 2000 18:13:35 +0000 |
| Subject: | Bug #4013: header function not functions after and if statment | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17553@lists.php.net to get a copy of this message | ||
From: everett@bentonrea.com
Operating system: linux 2.2.5-15smp
PHP version: 3.0.14
PHP Bug Type: Misbehaving function
Bug description: header function not functions after and if statment
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