Web Hosting Talk







View Full Version : any php experts?


RealityHost
07-19-2005, 09:57 AM
Any idea what could be causing this?

its only for the admin panal this is showing :(

Warning: Cannot modify header information - headers already sent by (output started at /home/****/public_html/league/config/config.php:137) in /home/****/public_html/league/login.php on line 144

Warning: Cannot modify header information - headers already sent by (output started at /home/****/public_html/league/config/config.php:137) in /home/***/public_html/league/login.php on line 145

Warning: Cannot modify header information - headers already sent by (output started at /home/***/public_html/league/config/config.php:137) in /home/****/public_html/league/login.php on line 81

Warning: Cannot modify header information - headers already sent by (output started at /home/***/public_html/league/config/config.php:137) in /home/***/public_html/league/login.php on line 96

Warning: Cannot modify header information - headers already sent by (output started at /home/***/public_html/league/config/config.php:137) in /home/***/public_html/league/login.php on line 81

Warning: Cannot modify header information - headers already sent by (output started at /home/****/public_html/league/config/config.php:137) in /home/***/public_html/league/login.php on line 96

Warning: Cannot modify header information - headers already sent by (output started at /home/****/public_html/league/config/config.php:137) in /home/***/public_html/league/login.php on line 152

maxymizer
07-19-2005, 10:01 AM
It's because you're trying to send headers (cookies, sessions, raw headers) AFTER you've sent some HTML.
You must first send headers, then HTML (meaning if you're using setcookie(), you can't put it in the middle of your html document).

Or you could use output buffering (which is doing your job for you).
Put ob_start() at the beginning of your page and ob_end_flush() at the end of your page.

RealityHost
07-19-2005, 10:09 AM
which file? login or config? thanks for the fast reply aswell :)

maxymizer
07-19-2005, 10:18 AM
Check them both. Even a space or newline is considered as output (meaning if you have <space><?php code here?> -> it's considered as output).

But if I had to take a guess, I'd say that problematic file would be config.php. Check it's line 137 and ensure that there are no output there. You might want to paste that line along with lines from login.php so we could inspect them..

RealityHost
07-19-2005, 10:23 AM
awsome i will do and thanks for your time helping :)

Much appreciated

RealityHost
07-19-2005, 10:33 AM
Sorted re did the config all good now thank you very much maxymizer :)

maxymizer
07-19-2005, 11:20 AM
I'm glad it works :)