At 18:04 16.11.2002, Lars Espelid said: --------------------[snip]-------------------- >Session-vars won't work on my pages either. >Tried your suggested code, but get the following errors in my browser: > >Page 1: >Warning: open(/tmp\sess_22b746f8ee84cf7aadb8da0b37ce9d2a, O_RDWR) failed: m >(2) in c:\apache group\apache\htdocs\system\kode\test.php on line 2 > > >Page 2: >Warning: open(/tmp\sess_22b746f8ee84cf7aadb8da0b37ce9d2a, O_RDWR) failed: m >(2) in c:\apache group\apache\htdocs\system\kode\ident.php on line 2
It looks as if you have either no /tmp directory (HIGHLY unlikely ;->), or the user account apache runs in doesn't have the necessary rights for the /tmp folder. Set the access mode for the session directory (here: /tmp) to rwxrwxrwx to allow anyone to read/write it. However it's better to have a dedicated directory for PHP session files, for security reasons (sensitive data may be stored there). On our servers, I have: session.save_path /tmp/session.php ls -ald /tmp/session.php gives: drwx------ 2 apache apache 16384 Nov 16 17:35 /tmp/session.php allowing full access only to user "apache", and no one else. >I have no other code on my pages. >I'm running Apache 1.3.26, PHP 4.0.5 on WinXPpro. > >Configuration problem?? Ups - yes, it's a config problem. On Win32 there's no directory /tmp, you need to set some other directory in php.ini file, e.g. C:/TEMP. What I said above for /tmp/session.php and the access rights holds true for Win32 as well. Create an own directory for PHP session files, and set access rights tightly, granting only the Apache user full access, denying anyone else. Also set the owner of this directory to the Apache user. Using the "Services" control panel, make sure Apache doesn't run under the "system" or "Administrator" account, create a user for the Apache service and grant the necessary rights (e.g. "allowed to run as a service", "may log on locally", etc). -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php