#23479 [Fbk->Opn]: session settings in php.ini ignored

From: Date: Thu, 08 May 2003 16:26:31 +0000
Subject: #23479 [Fbk->Opn]: session settings in php.ini ignored
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39318@lists.php.net to get a copy of this message
ID: 23479 User updated by: seven at nimrod-online dot com Reported By: seven at nimrod-online dot com -Status: Feedback +Status: Open Bug Type: Session related Operating System: Windows 98 PHP Version: 4.3.2RC2 New Comment: the following session settings are set: session.save_handler = files session.save_path = E:\\program files\\webserver\\php\\tmp session.use_cookies = 1 session.name = SESSION The rest is default. I have not tried Apache 1.3.27 yet, because I am not interested in running Apache 1.3.27. Several friends of mine had the same problem when using the php4apache2.dll. Using a different server like IIS will work, and using the cgi binary isn't safe enough for me. Previous Comments: ------------------------------------------------------------------------ [2003-05-05 16:41:53] sniper@php.net What exactly did you write in php.ini for these settings? And have you tried with Apache 1.3.27 yet? ------------------------------------------------------------------------ [2003-05-04 16:32:24] seven at nimrod-online dot com Some notes: with 'When i remove the slashes', i mean the slashes before ini_set(. Also, the question in the end was somewhat misplaced, since i have asked this on 3 different ways to other people. The most likely problem is a bug in the php4apache2.dll. Also, i have tried setting something totally useless(like error_append_string) at the bottom of my php.ini, but this doesn't seem to work either. Probably this problem has much to do with the reading of this file in Windows 98(like, a 32KB limit or something?) ------------------------------------------------------------------------ [2003-05-04 16:23:50] seven at nimrod-online dot com Currently I am running Apache 2.0.45 with PHP 4.3.2RC2, and not any of my scripts store sessions. When i use the script: <?php //ini_set("session.save_path","e:\\program files\\webserver\\php\\tmp"); $foo = "bar"; session_start(); session_register("foo"); session_write_close(); ?> i get the following error messages: Warning: session_start(): open(/tmp\sess_c61f98f39e73fa535a14be0dde19a36e, O_RDWR) failed: No such file or directory (2) in E:\program files\Webserver\www-docs\session.php on line 4 Warning: session_write_close(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in E:\program files\Webserver\www-docs\session.php on line 6 Warning: session_write_close(): open(/tmp\sess_c61f98f39e73fa535a14be0dde19a36e, O_RDWR) failed: No such file or directory (2) in E:\program files\Webserver\www-docs\session.php on line 6 Warning: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in E:\program files\Webserver\www-docs\session.php on line 6. When i remove the slashes, the errors stop(except for the 2nd, but that's because i didn't set session.bug_compat_warn to off). The most strange error for me is 'Warning: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in E:\program files\Webserver\www-docs\session.php on line 6', because in my php.ini, session.save_path isn't set to /tmp, but to e:\\program files\\webserver\\php\\tmp. Also, PHP doesn't take over the settings for session.name or any other session related option. I am sure thou that I am editing the right php.ini, because phpinfo() tells me the exact path to my php.ini, that I was editing. I always reset the server after I made changes to my php.ini, so that isn't the problem either, and I know that the path is valid, because sessions work when I use the command ini_set("session.save_path","the path"), sessions DO get stored. One more note: when I read my phpinfo, it also gives the 'standard settings' for sessions, even thou I have edited the php.ini. All the other settings are taken over perfectly by PHP. How can I solve this problem, without having to add ini_set to every file(or including a file which does this for me)? In other word, can this be fixed, and if yes, how? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23479&edit=1

« previous php.bugs (#39318) next »