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.
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.
thank you, it helps perfect : “C:xampptmp”
I had problems with XAMPP sessions and fixed it by setting this : session.auto_start = 1
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….
Glad to hear that php manual has all the session related information. We need to look carefully. 🙂
Glad to hear that. 🙂
but in my xammp not working
Do you get any exact error ?
Thanks, helped a lot.
🙂
But what about Mac? Any ideas there?
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.
It’s my pleasure 🙂
very useful! I was confronting the same issue and your advice solved it! Thanks!