Im using sessions for validation for my news script and am having problems with this new version of PHP.
I use this piece of code to login:
session_start();
session_register("username");
And this to check if someone is logged in:
session_start();
if(session_is_registered("username"))
{
//do whatever code here
}
I get the following errors from both checking and actually logging in:
Warning: open(/tmp/sess_b1fb9ffcf5327cd942f5d60627926f07, O_RDWR) failed: Permission denied (13) in /home/binary/binary.gamer.net.nz/htdocs/stuff/pp/login.php on line 9
Warning: open(/tmp/sess_b1fb9ffcf5327cd942f5d60627926f07, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
I never used to get these errors with previous versions of PHP and I presume it is something to do with the new "session_name()" function but I cant figure out what.
Any help would be greatly appreciated 🙂