Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Session Errors

  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts

    Session Errors

    This is tha page with the errors

    I am getting the following errors:
    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/webdesign/public_html/~~~/Store/store2.php:3) in /home/webdesign/public_html/~~~/Store/store2.php on line 4

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/webdesign/public_html/~~~/Store/store2.php:3) in /home/webdesign/public_html/~~~/Store/store2.php on line 4


    I beleive the code that is generating this error is:
    PHP Code:
    session_start();
    $Type $_SESSION['Type'];
    $Size $_SESSION['Size'];
    $Color $_SESSION['Color'];
    $fname $_SESSION['fname'];
    $lname $_SESSION['lname'];
    $email $_SESSION['email'];
    $phone1 $_SESSION['phone1'];
    $phone2 $_SESSION['phone2'];
    $phone3 $_SESSION['phone3'];
    $street $_SESSION['street'];
    $city $_SESSION['city'];
    $state $_SESSION['state'];
    $zip $_SESSION['zip'];
    $special $_SESSION['special']; 
    What is it thats causing these errors? What can i do to fix it? Thanks.
    Last edited by Ultragames; 10-05-2004 at 03:38 AM.
    If I'm postin here, I NEED YOUR HELP!!

  • #2
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must call session_start() before outputting anything at all. Solve this by putting session_start() on the very first line.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    Hey,

    Ok I can see that infact you do have the session start function there, however you have one single space before it.. that tiny space is making those nasty errors.. delete that and it will be good

  • #4
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The space does nothing if it is inside php tags (<?php ... ?>)

    Also, that space is put there by CF for some reason (probably to do with the php highlighting function.)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •