php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7956 error while staring the session
Submitted: 2000-11-24 01:12 UTC Modified: 2000-12-02 08:53 UTC
From: laxman_lawande at yahoo dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.3pl1 OS: Redhat Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: laxman_lawande at yahoo dot com
New email:
PHP Version: OS:

 

 [2000-11-24 01:12 UTC] 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.
 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-02 08:53 UTC] sas@php.net
Fix: Change session.save_path to a valid directory name on your system.

Thanks for using PHP.
 [2023-03-18 05:44 UTC] testing at example dot com
1
 [2023-03-18 05:44 UTC] testing at example dot com
1
 [2023-03-18 05:44 UTC] testing at example dot com
1
 [2023-03-18 05:44 UTC] testing at example dot com
1
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 02:01:32 2025 UTC