|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-12-02 08:53 UTC] sas@php.net
[2023-03-18 05:44 UTC] testing at example dot com
[2023-03-18 05:44 UTC] testing at example dot com
[2023-03-18 05:44 UTC] testing at example dot com
[2023-03-18 05:44 UTC] testing at example dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 10:00:01 2025 UTC |
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.