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.

[php]
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

[/php]

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

First stop the Xampp Server.

[php]
session.save_path = "\xampp\tmp"
[/php]

and change it to look like this

[php]
session.save_path = "C:\xampp\tmp"
[/php]

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

Hope this was useful for someone.

14 Replies to “Xampp : Session Error”

  1. 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.

  2. 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….

    1. 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.

Comments are closed.