Page 1 of 1
session error
Posted: Wed Nov 20, 2002 12:14 am
by wharez
I have been following the tutorial by Jason 'Sessions for Newbies' and keep coming up with the following error:
Warning: open(/tmp\sess_e77c082dd9fae48b316a59a1feb40264, O_RDWR) failed: m (2) in C:\apache\htdocs\mysite\sessions\sessiontest.php on line 2
can anyone help me out?
I have read the 'warning' cannot add header information' post, and that did help me with another problem that I was having.
Wayne
I'm a happy mushroom, when I'm not a sad one.

Posted: Wed Nov 20, 2002 12:51 am
by wharez
hey all who read this,
well it didn't take me that long to find out what the problem was. It seems that the default PHP installation session variables weren't correct in the php.ini file.
I went here:
http://nz2.php.net/manual/en/ref.session.php
and after making the appropriate changes it still wouldn't work.
However, a little further down the page I came across a small note:
Note: Windows users have to change this variable in order to use PHP's session functions. Make sure to specify a valid path, e.g.: c:/temp.
So I changed the default php.ini entry of "/temp" to "c:/windows/temp" and now it works fine.
yipee!!
I hope that this might help someone else out there

Posted: Fri Nov 22, 2002 12:09 pm
by elias10
i have the same problem with you.
I received the same error
Warning: open(/tmp\sess_0d0265cae92fee731444d2a6e03b7f6f, O_RDWR) failed: m (2) in c:\program files\apache group\apache\htdocs\test\ptixiaki\index.php on line 4
So i edit the php.ini file
session.save_path = c:/winnt/temp;
I restarted apache web server and i hava again thios error msg
Warning: open(/tmp\sess_0d0265cae92fee731444d2a6e03b7f6f, O_RDWR) failed: m (2) in c:\program files\apache group\apache\htdocs\test\ptixiaki\index.php on line 4
Why the folder tmp didn;t change?
I changed it in the php.ini to c:/winnt/temp;
I use win2000 mysql and apache
WHY
Posted: Fri Nov 22, 2002 12:12 pm
by elias10
i run phpinfo() and the variable session.save_path
is /tmp
But the in the php.ini file i changed it to session.save_path = c:/winnt/temp
I must restart the pc?????

Posted: Fri Nov 22, 2002 6:15 pm
by wharez
Hi there elias
in your first posted message you said that you changed the php.ini file as follows:
session.save_path = c:/winnt/temp;
is this EXACTLY what you put there? Try removing the ; from the end of the line. That is only for placing a comment after the line.
Then try a restart and see if the phpinfo.php session values have changed to c:/winnt/temp
also, of course, that directory must exist.
Wayne

Posted: Fri Nov 22, 2002 7:18 pm
by volka
a restart is only needed if using php as module (in opposition to cgi) and refers to the webserver-software (e.g. apache process) not the entire computer
