Jump to content

Session Errors


aenigma

Recommended Posts

Im trying to call a session via session_start(); in a script, and im getting this error.

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/frozen/public_html/fg/index.php: in /home/frozen/public_html/fg/ses.php on line 11

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/frozen/public_html/fg/index.php: in /home/frozen/public_html/fg/ses.php on line 11

 

PHP version 4.4.6

Link to comment
https://forums.phpfreaks.com/topic/47662-session-errors/
Share on other sites

Please read the stickies in this forum before making a new post.

 

session_start() requires the modification of HTML headers.  Therefore, the session_start() call MUST be placed BEFORE any output has been sent to the browser.  Check your index.php script on line 8, because at this point you began sending output.  Just put

<?php
session_start();
?>

Before ANYTHING (including whitespace and newlines).

Link to comment
https://forums.phpfreaks.com/topic/47662-session-errors/#findComment-232746
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.