PHP 4.0 Bug #7956 Updated: error while staring the session
| From: | sas@php.net | Date: | Sat, 02 Dec 2000 13:53:11 +0000 |
| Subject: | PHP 4.0 Bug #7956 Updated: error while staring the session | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39837@lists.php.net to get a copy of this message | ||
ID: 7956
Updated by: sas
Reported By: laxman_lawande@yahoo.com
Status: Closed
Bug Type: *Session related
Assigned To:
Comments:
Fix: Change session.save_path to a valid directory name on your system.
Thanks for using PHP.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-24 01:12:49] laxman_lawande@yahoo.com
Hi,
I am using php4.0.3 pl1 on windows NT 4.
Initially i set session.auto_start=0 in the configuration file(php.ini)
there is another setting in the configuration file i.e session.save_path
is this the path where php will store session related information?
and if yes than after using session_destroy or session_unset will
the session related details will be deleted.
this does not happen on my system .Any specific settings required.
I am giving a sample script which runs fine on linux server
running apache web server and using php4.0.3 pl1
with session.auto_start =1 in php.ini
sample script:
------------
<php
session_register(SESSION) /* register a session variable*/
if(!isset($SESSION[sessionid])) /* will be unset for the first time*/
{
$SESSION["login_id"]=$login; /* set the values of session variables*/
$SESSION["pass"]=$password;
}?>
/* accessing these session variables in other php scripts*/
test.php
-------
<?php
session_register(SESSION) /* is this explicitly required or the session
variables will be passed by default */
if(!isset($SESSION[sessionid])) /* will be set if login and password is
correct
{
take necessary action
}
else
proceed
script executed when signout is clicked
-------------------------------
<?php
session_register(SESSION)
if(isset($SESSION[sessionid]))
{
session_unregister("SESSION");
}
?>
bug :
-----
when I tried to run the same script on the windows NT 4 server
with apache server running php 4.0.2
with session.auto_start =1 and session.save_path=/tmp
i get the following errors:
1. warning: open(/tmpsess_41f84ff363faba0f398479ac1c7d8e08, O_RDWR) failed: m (2)
in Unknown on line 0
2. Warning: Failed to write session data (files). Please verify that the current se
tting of session.save_path is correct (/tmp) in Unknown on line 0
Pls let me know whether the /tmp folder should be created in the same
directory where php in installed or it can be in some other directory.
is the problem because session.auto_start=1
Pls note that with the same settings but windows NT 4 and
php 4.0.3 pl1 the scripts are working fine.
Also Pls tell me if I have to explicitly specify session_start()
in my code (every script) if session.auto_start=0 and if it is 1 will it give
me an error with the above funciton in my code.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7956