Jump to content

[SOLVED] session error


ohdang888

Recommended Posts

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/socialap/public_html/posters/index.php:1) in /home/socialap/public_html/posters/index.php on line 2

 

These are the first two lines... And session_start() is not called anywhere else.

<?php

session_start();

?>

 

 

Hm.... whats wrong here?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/137628-solved-session-error/
Share on other sites

You cannot have any output before it, not even blank lines or spaces.  I notice in that code you posted, there's a space before the <?php could be that, or if that was just a typo on the forum, something else.  Do not use ob_start();.  First off, same rule applies: has to be before output. 2nd, it's a bandaid, not a fix.  The fix would be to code properly to begin with.

Link to comment
https://forums.phpfreaks.com/topic/137628-solved-session-error/#findComment-719371
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.