|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-13 00:03 UTC] iliaa@php.net
[2006-07-13 05:43 UTC] ralph at smashlabs dot com
[2006-07-13 13:45 UTC] iliaa@php.net
[2006-07-14 06:21 UTC] ralph at smashlabs dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 02:00:02 2025 UTC |
Description: ------------ 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. See rest below: Reproduce code: --------------- 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(); echo "COUNTER : " . $_SESSION['counter']; ?> Expected result: ---------------- The first 5 times it runs, it works fine... which means the file was created with the proper permissions and at the proper location. On the 5th run, I should not see any errors. Only the before and after Session ID AND there should be a file in the directory with the old session data... Counter should never start over. Actual result: -------------- SESSION ID BEFORE: 1e1469055dd81c95fb78aafde667639a SESSION ID AFTER : a51b257a22da32065a0bef114abac7c7 COUNTER : 5 Warning: Unknown: open(../application/var/sessions/sess_a51b257a22da32065a0bef114abac7c7, 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