• Need some PHP help.
    5 replies, posted
Getting some PHP errors with something I just purchased. Cannot modify header information - headers already sent by (output started at /home/knfegami/public_html/dev/admin/index.php:2) in /home/knfegami/public_html/dev/admin/login.php on line 28 Will provide any additional information. index.php line 2 (Lol) [code] <?php [/code] login.php line 28 [code] header('Location: ' . $openid->authUrl()); [/code]
Basically the problem is very simple, The script you have purchased is setting the headers twice. You need to look at /admin/index.php and /admin/login.php and see if either one includes the other and see if it's setting the header twice or something.
generally this error comes from: printing something before you send a redirect (that header location thing) starting a session before a redirect setting a cookie before a redirect
I think I determined that it is an issue with my outdated PHP. The script works on his webserver, and he runs a newer version.
[url="http://facepunch.com/showthread.php?t=1250244"]I think this question should be here.[/url]
DocType was too before the header, moving it fixed it.
Sorry, you need to Log In to post a reply to this thread.