Bug #7956 [Com]: error while staring the session
| From: | testing at example dot com | Date: | Sat, 18 Mar 2023 05:44:33 +0000 |
| Subject: | Bug #7956 [Com]: error while staring the session | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-243923@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=7956&edit=1
ID: 7956
Comment by: testing at example dot com
Reported by: laxman_lawande at yahoo dot com
Summary: error while staring the session
Status: Closed
Type: Bug
Package: Session related
Operating System: Redhat Linux
PHP Version: 4.0.3pl1
Block user comment: N
Private report: N
New Comment:
1
Previous Comments:
------------------------------------------------------------------------
[2023-03-18 05:44:33] testing at example dot com
1
------------------------------------------------------------------------
[2023-03-18 05:44:33] testing at example dot com
1
------------------------------------------------------------------------
[2023-03-18 05:44:31] testing at example dot com
1
------------------------------------------------------------------------
[2000-12-02 08:53:11] sas@php.net
Fix: Change session.save_path to a valid directory name on your system.
Thanks for using PHP.
------------------------------------------------------------------------
[2000-11-24 01:12:49] laxman_lawande at yahoo dot 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(/tmp\sess_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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=7956&edit=1