CI Session & Cookie Error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: CI Session & Cookie Error (/showthread.php?tid=22536) |
CI Session & Cookie Error - El Forum - 09-12-2009 [eluser]midknight[/eluser] Hey Guys! Been flipping through my files like crazy trying to find out why I am getting errors revolving around sessions and cookies. Been trying to search the forum for similar problems/solutions but I haven't seen anything yet (or it is there just didn't jump out). If someone could help me out that would be awesome!. Thanks! Code: class dhr extends Controller PHP 5.2.2/MySQL 5.0.45/Linux - Server Checked all of my files for whitespace Cookie domain is set to the domain name .domainname.com Log Dump: DEBUG - 2009-09-12 18:45:42 --> Config Class Initialized DEBUG - 2009-09-12 18:45:42 --> Hooks Class Initialized DEBUG - 2009-09-12 18:45:42 --> URI Class Initialized DEBUG - 2009-09-12 18:45:42 --> Router Class Initialized DEBUG - 2009-09-12 18:45:42 --> Output Class Initialized DEBUG - 2009-09-12 18:45:42 --> Input Class Initialized DEBUG - 2009-09-12 18:45:42 --> XSS Filtering completed DEBUG - 2009-09-12 18:45:42 --> Global POST and COOKIE data sanitized DEBUG - 2009-09-12 18:45:42 --> Language Class Initialized DEBUG - 2009-09-12 18:45:42 --> Loader Class Initialized DEBUG - 2009-09-12 18:45:42 --> Helper loaded: form_helper DEBUG - 2009-09-12 18:45:42 --> Helper loaded: url_helper DEBUG - 2009-09-12 18:45:42 --> Helper loaded: text_helper DEBUG - 2009-09-12 18:45:42 --> Helper loaded: date_helper DEBUG - 2009-09-12 18:45:42 --> Helper loaded: display_helper DEBUG - 2009-09-12 18:45:42 --> Helper loaded: flash_helper DEBUG - 2009-09-12 18:45:42 --> Helper loaded: security_helper DEBUG - 2009-09-12 18:45:42 --> Database Driver Class Initialized DEBUG - 2009-09-12 18:45:42 --> Session Class Initialized DEBUG - 2009-09-12 18:45:42 --> Helper loaded: string_helper DEBUG - 2009-09-12 18:45:42 --> Encrypt Class Initialized DEBUG - 2009-09-12 18:45:42 --> Session routines successfully run DEBUG - 2009-09-12 18:45:42 --> Email Class Initialized DEBUG - 2009-09-12 18:45:42 --> Validation Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Model Class Initialized DEBUG - 2009-09-12 18:45:42 --> Controller Class Initialized ERROR - 2009-09-12 18:45:42 --> Severity: Warning --> session_start() [<a href='function.session-start'>function.session-start</a>]: open(/var/php_sessions/sess_fd6d789fa5ca8cac4ed8d234c2b0b9df, O_RDWR) failed: No such file or directory (2) [EDITED]/application/controllers/dhr.php 35 ERROR - 2009-09-12 18:45:42 --> Severity: Warning --> session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at [EDITED]/system/libraries/Exceptions.php:164) [EDITED]/application/controllers/dhr.php 35 ERROR - 2009-09-12 18:45:42 --> Severity: Warning --> session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at [EDITED]/system/libraries/Exceptions.php:164) [EDITED]/application/controllers/dhr.php 35 DEBUG - 2009-09-12 18:45:42 --> File loaded: [EDITED]/system/../application/views/header.php DEBUG - 2009-09-12 18:45:42 --> File loaded: [EDITED]/system/../application/views/login.php DEBUG - 2009-09-12 18:45:42 --> File loaded: [EDITED]/system/../application/views/sidebar.php DEBUG - 2009-09-12 18:45:42 --> File loaded: [EDITED]/system/../application/views/footer.php DEBUG - 2009-09-12 18:45:42 --> File loaded: [EDITED]/system/../application/views/template.php DEBUG - 2009-09-12 18:45:42 --> Final output sent to browser DEBUG - 2009-09-12 18:45:42 --> Total execution time: 0.3755 ERROR - 2009-09-12 18:45:42 --> Severity: Warning --> Unknown: open(/var/php_sessions/sess_fd6d789fa5ca8cac4ed8d234c2b0b9df, O_RDWR) failed: No such file or directory (2) Unknown 0 ERROR - 2009-09-12 18:45:42 --> Severity: Warning --> Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_sessions) Unknown 0 CI Session & Cookie Error - El Forum - 09-13-2009 [eluser]pmorris[/eluser] Can your application write to /var/php_sessions? Why are you using PHP sessions and the CI session class anyway? CI Session & Cookie Error - El Forum - 09-13-2009 [eluser]midknight[/eluser] I am not wanting to use PHP sessions I want to use the CI sessions. Not sure why this is happening. /var/sessions would only matter if I was using PHP session no? CI Session & Cookie Error - El Forum - 09-13-2009 [eluser]InsiteFX[/eluser] Are you loading the Sessions Class or are you autoloading? Enjoy InsiteFX CI Session & Cookie Error - El Forum - 09-13-2009 [eluser]midknight[/eluser] I am autoloading the session class along with email, database and validation. CI Session & Cookie Error - El Forum - 09-13-2009 [eluser]brianw1975[/eluser] a) if you are using CI sessions then don't ever use session_start() - CI can't override a true php function, at least I don't believe it can. b) make sure that /var/php_sessions exists and is writable by your webserver (apache|www-data|httpd|soemthing else) in case you aren't using the database to store the session data. CI Session & Cookie Error - El Forum - 09-13-2009 [eluser]midknight[/eluser] brianw1975: Thanks for tip a) that did the trick. I am using a DB to store the session data as well. LOL from your other posts on the forum I could see why this question gets you mad with us N00Bs! |