0

Hi guys please help; so I have this Login in my webpage when I'm doing it on my pc(vista and wamp) there is no error I can Login/out, but when it is hosted on the server(ubuntu and xampp) I am getting this error :(
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers. Thank You :)

3
Contributors
2
Replies
25
Views
4 Years
Discussion Span
Last Post by Webville312
0

The server cannot send any more http headers if the HTTP Content has started sending.
In PHP code, this means you have ouput something to the page with echo or print etc.

PHP will not output any whitespace in between php tags, However, for anything outside php tags, (eg: html) whitespaces, linebreaks are sent as HTTP Content.
Sometimes this your editor may add whitespace also.

To prevent whitespace from being sent before you send all your headers, make sure the <?php is right at the top of the php script, and there are no lines or white space in between.

try placing this at the top of your page:

buffer your PHP output before sending it to HTTP

<?php ob_start(); ?>

then at the bottom of the page place this line of code to send http output when you need:

<?php ob_flush(); ?>

For reference click here.

Edited by IIM

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.