Re: header redirect not working

From: Date: Sat, 13 Aug 2005 03:49:37 +0000
Subject: Re: header redirect not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-220544@lists.php.net to get a copy of this message
Pablo Gosse wrote:
Can anyone think of any reason why the above code, just those two lines, would redirect correctly in one environment, yet simply redirect to the currently existing page in another?
I can think of a few, and my first instinct is to check to see whether your script produces any errors in one environment that it doesn't in the other. If you're displaying errors, they can affect the behavior of your scripts when you're also using header(). Replace header() with echo and compare the behavior. Also, comparing php.ini can help you identify differences in configuration. Configuration directives can be modified through other means, but this is a good starting point (and a good candidate for version control anyway - inconsistencies can cause you to waste time and effort). Hope that helps. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/

« previous php.general (#220544) next »