Posted by Jerry Stuckle on 08/28/06 16:05
geshan wrote:
> these are the errors i get,
>
> Warning: session_start() [function.session-start]: Cannot send session
> cookie - headers already sent by (output started at
> D:\Xampp\xampp\htdocs\GM_PHP\includes\conn1.php:11) in
> D:\Xampp\xampp\htdocs\GM_PHP\login_process.php on line 2
>
> Warning: session_start() [function.session-start]: Cannot send session
> cache limiter - headers already sent (output started at
> D:\Xampp\xampp\htdocs\GM_PHP\includes\conn1.php:11) in
> D:\Xampp\xampp\htdocs\GM_PHP\login_process.php on line 2
>
> Warning: Cannot modify header information - headers already sent by
> (output started at D:\Xampp\xampp\htdocs\GM_PHP\includes\conn1.php:11)
> in D:\Xampp\xampp\htdocs\GM_PHP\login_process.php on line 38
>
<code snipped>
>
> I need help. Please Help Fast
>
Just like it said - line 11 of includes\conn1.php is causing output to
be sent to the browser. This forces the headers to be sent to the
browser. session_start() must be called before ANY output is sent to
the browser.
The output could be from an echo or print statement, for instance. Or
it could be just whitespace outside of the <?php ... ?> brackets. Any
output will cause the headers to be sent.
The only confusing factor here is that you don't include
include\conn1.php until after the session_start() command. It looks
like this isn't your exact code, or perhaps your login_process.php is
itself included in another file.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|