I\'m trying to start the session in a header page in my webiste. But it seems there might be some sort of bug because it fails with the following error:
Warn
This means that you don't have the correct permissions to either read or write the files in the temp directory.
If you on linux then do this
sudo chmod -R 755 \xampp\tmp //or should it be 775
On windows do this as an administrator
attrib -r -a C:\xampp\tmp /S
As Selular88 mentioned, Adding the path works and fix this issue. You can also check the path using
// This will output your current path.
echo session_save_path() ;
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.