[UPHPU] php user authentication

thebigdog bigdog at venticon.com
Thu Apr 24 12:43:41 MDT 2008


justin wrote:
> On Wed, Apr 23, 2008 at 10:53 PM, michael geary <listmail at gearyweb.com> wrote:
>> a header() redirect must be called before anything is *output* to the
>> browser. If you have output_buffering turned on, this is relaxed for the
>> most part, but there are good reasons to avoid that sloppiness and separate
>> your app and display logics
> 
> michael's absolutely right. every once in a while i run into trouble
> with redirects not working, and usually  it's because something leaked
> into output before i sent the header... usually it's an extra space
> after the closing php tag of an included file or something. so watch
> out for those too :)

Also be aware that you might have redirect issues with the browser. I know that 
firefox has a redirect limit config option that is set to 20. So you might want 
to watch the total amount of redirects sent to a browser. Also know that 
redirects cause the user to request a new url. I find that outputting the 
desired code might be another alternative to the redirect. In OO design this 
could be accomplished with an include of your login form for the page. then you 
can do a simple post back to the page and catch the login and then display the 
page if needs be.


--
ray


More information about the UPHPU mailing list