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.