I have not dug super deep into this problem but it seems as though if I try to call session_regenerate_id() after having set session.save_path with custom values, i get an error. My guess is that session_regenerate_id() is having issues with the save_path var.

This is my test script:

file: ../htdocs/test.php
<?

ini_set("session.save_path", ";666;../application/var/sessions");

session_start();

$id_before = session_id();

if ((++$_SESSION['counter'] % 5) == 0)
{
    session_regenerate_id(true);
}

echo "<pre>SESSION ID BEFORE: " . $id_before . "\n";
echo "SESSION ID AFTER : " . session_id();

?>



The first 5 times it runs, it works fine... which means the file was created with the proper permissions and at the proper location.

The 5th run produces this:

SESSION ID BEFORE: 36236b948b074164d5344184a79ceeff
SESSION ID AFTER : 759d5771cbcd3535c03660cc056385df

Warning: Unknown: open(../application/var/sessions/sess_759d5771cbcd3535c03660cc056385df, O_RDWR) failed: No such file or directory (2) in Unknown on line 0



Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (;666;../application/var/sessions) in Unknown on line 0







My permission on that directory are 777.. so technically there should be no problem.

/home/ralph/development/vhosts/framework.dev.smashlabs.com/application/var
drwxrwxrwx  2 ralph users 4096 Jul 12 13:30 sessions

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to