Warning: session_start() [function.session-start]: Cannot send session cookie - heade

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanjusb
    New Member
    • Mar 2008
    • 1

    Warning: session_start() [function.session-start]: Cannot send session cookie - heade

    My problem is :

    Warning: session_start() [function.sessio n-start]: Cannot send session cookie - headers already sent by (output started at /home/xtreme/public_html/forum_tire.php: 2) in /home/xtreme/public_html/forum_tire.php on line 26

    My Code is :
    [php]
    // Using PHP5 version
    <?php
    session_start() ;

    $_SESSION['name'] = $_POST[nm];
    $_SESSION['passd'] = $_POST[ps];
    ?>
    [/php]
    Plz, help me ASAP..
    Last edited by ronverdonk; Mar 21 '08, 10:36 PM. Reason: code in tags
  • satas
    New Member
    • Nov 2007
    • 82

    #2
    Hi sanjusb. Delete following line from your script.
    [PHP]// Using PHP5 version[/PHP]

    P.S. Dont forget to use [code] tags next time you post question.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Originally posted by sanjusb
      My problem is :

      Warning: session_start() [function.sessio n-start]: Cannot send session cookie - headers already sent by (output started at /home/xtreme/public_html/forum_tire.php: 2) in /home/xtreme/public_html/forum_tire.php on line 26

      My Code is :

      // Using PHP5 version
      <?php
      session_start() ;

      $_SESSION['name'] = $_POST[nm];
      $_SESSION['passd'] = $_POST[ps];
      ?>

      Plz, help me ASAP..
      Welcome to TSDN, sanjusb!

      Comment

      Working...