From: seven at nimrod-online dot com
Operating system: Windows 98
PHP version: 4.3.2RC2
PHP Bug Type: Session related
Bug description: session settings in php.ini ignored
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 bug report at http://bugs.php.net/?id=23479&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23479&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23479&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23479&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23479&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23479&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23479&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23479&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23479&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23479&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23479&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23479&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23479&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23479&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23479&r=gnused