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 :)

Recommended Answers

All 2 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.