Xampp : Session Error

Below are the error in php due to session. This happens usually when server is unable to save the sessions data temporarily due to the improper path settings in session.save_path = “\xampp\tmp”.
Solution is to set the session.savepath correctly to point to directory where server can find it easily.

Warning: session_start() [function.session-start]: open(\xampp\tmp\sess_nsvvoh9f5l55g063d7qka1lq72, O_RDWR) failed: No such file or directory (2) in D:\htdocs\bull_ext\access_control\main.inc on line 39

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\htdocs\bull_ext\access_control\main.inc:39) in D:\htdocs\bull_ext\access_control\main.inc on line 39

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\htdocs\bull_ext\access_control\main.inc:39) in D:\htdocs\bull_ext\access_control\main.inc on line 39

Warning: Cannot modify header information - headers already sent by (output started at D:\htdocs\bull_ext\access_control\main.inc:39) in D:\htdocs\bull3\framework\application.inc on line 589

This settings is stored inside the php.ini file, which can be found under c:\xampp\php\ directory.

First stop the Xampp Server.

session.save_path = "\xampp\tmp"

and change it to look like this

session.save_path = "C:\xampp\tmp"

Restart the Xampp Server. That’s it now your session should work as expected.

Hope this was useful for someone.

14 thoughts on “Xampp : Session Error

  1. Ayush

    No it didnt worked…
    M using xampp version 7.0.1 over windows 8.1
    I have tried every method possible in php.ini….
    On the page i write the code to start session… the page shows error of “your connection was interupted”
    Means the xamp fails over that command… please help asap…

    Reply
  2. rAi

    Thanks you very much, I had this problem because of moving www folder to another unit from C: to D: and changind this session path solved my problem.

    Reply
  3. Avinash Raut

    thanks…Its working…
    From long time i face problem related PHP session, but after getting this article i understand that “where session set”…
    again thank you very much….

    Reply
    1. Samundra Shrestha

      The error happens when system cannot save session in the path setup in xampp. So my guess would be to verify if system can actually save the files in the supplied path or not. Sorry i cannot be of much help, I don’t have any experience with MAC.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *