ID:               38085
 User updated by:  ralph at smashlabs dot com
 Reported By:      ralph at smashlabs dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Session related
 Operating System: Linux 2.6 series
 PHP Version:      5.1.4
 New Comment:

Thanks for the quick response.

For both 5.1.4 and 5.2 that script works fine if I use a full path from
root, eg: /home/ralph/dev/application/var/sessions
(including with a trailing slash too).

In both 5.1.4 and 5.2 the problem persists when you use a relative
path.

Can you not reproduce this?  Shall I post some INI info?

While not super high priority, in a bootstrapped type framework based
envoirment, it would be nice to be able to use relative paths for
portablity reasons.

Thanks again.
Ralph


Previous Comments:
------------------------------------------------------------------------

[2006-07-13 00:03:05] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Works fine in latest cvs, even with 10 runs.
Have you tried changing ../application/var/sessions to a full 
path?

------------------------------------------------------------------------

[2006-07-12 21:59:44] ralph at smashlabs dot com

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38085&edit=1

Reply via email to