1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Cannot send session cache limiter - headers already sent

Discussion in 'PHP' started by jbashir, Dec 2, 2006.

  1. #1
    I am getting these warnings. Can someone please help me how I can solve these problems?

    Warning: session_start() [function.session-start]: open(../../sess_e6c892857130433aebff3c32122517b1, O_RDWR) failed: No such

    file or directory (2) in /../session.inc on line 28

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started

    at /../session.inc:28) in /../session.inc on line 28
     
    jbashir, Dec 2, 2006 IP
  2. Alx

    Alx Member

    Messages:
    94
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #2
    I think you have wrong permissions for "../../" folder, it should be writable for user running httpd.
     
    Alx, Dec 2, 2006 IP
  3. phaseonemedia

    phaseonemedia Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, check your php.ini file to make sure the path to the session folder is set correctly. If you can't do this ask your systems admin and they will do it for you.
     
    phaseonemedia, Dec 2, 2006 IP
  4. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #4
    session start won't affect headers after it.....
     
    krakjoe, Dec 2, 2006 IP
  5. jbashir

    jbashir Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Alx how can I set the permissions rightable for this folder?
     
    jbashir, Dec 3, 2006 IP
  6. Luke

    Luke Peon

    Messages:
    111
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No, but the error that is being produced by the session is sending Error HTML back to the client, so its creating temporary headers, which causes the headers sent later to error.
     
    Luke, Dec 4, 2006 IP
  7. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #7
    it doesnt matter, the error isn't to do with where the session is started.
     
    krakjoe, Dec 4, 2006 IP
  8. Luke

    Luke Peon

    Messages:
    111
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You should be able to use CHMOD with a FTP client to set the permissions to writable.
     
    Luke, Dec 4, 2006 IP
  9. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #9
    after much contemplation, and trying to replicate the error....
    
    <?
    // dir could be /home/user/session
    // keep it OUT of webroot
    ini_set("session.save_path", "/path/to/dir/with/chmod/777/perms");
    ?>
    
    PHP:
    Right at the top of the script, before any code
     
    krakjoe, Dec 4, 2006 IP
  10. jtrag

    jtrag Well-Known Member

    Messages:
    21
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    118
    #10
    +1 This option makes far more sense than editing each of your PHP scripts when really it's just a permissions setting on the php.ini file keeping Apache, etc. from being able to write to the /tmp directory or whichever directory your sessions are stored in. This can easily be fixed by logging into your server via FTP with the root account and pw and then CHMOD your /tmp folder to 755 or 777 (only if 755 don't work), or you could use Putty which is a free SSH Program and you can do it all via command line by typing into the console like so:

    "chmod 0755 /tmp" (or "chmod 0777 /tmp") Without the quotes of course. What this will do is set the permissions on your /tmp folder or whatever so the server is able to write to it and store sessions and all properly.

    Fix it the right way. Don't rewrite your scripts... Just fix your php.ini !
     
    jtrag, Jul 15, 2011 IP