using the SESSION superglobal
Moderator: General Moderators
using the SESSION superglobal
Hi
I am having a problem with the SESSION superglobal. When I use the session_start(); command within a php page I have an error of "Warning: session_start(): open(/tmp\sess_91fe588e6cb297919441b949431254f1, O_RDWR) failed: No such file or directory (2) in c:\web\listing10.2.php on line 2 So I changed the setting of session.auto_start = 1 in the php.ini, which fixes this problem but I then have a problem which is Warning: Unknown(): open(/tmp\sess_562f3ba648ebc190d50011c8b45e9209, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Can anyone help??
Thanks
Joki
I am having a problem with the SESSION superglobal. When I use the session_start(); command within a php page I have an error of "Warning: session_start(): open(/tmp\sess_91fe588e6cb297919441b949431254f1, O_RDWR) failed: No such file or directory (2) in c:\web\listing10.2.php on line 2 So I changed the setting of session.auto_start = 1 in the php.ini, which fixes this problem but I then have a problem which is Warning: Unknown(): open(/tmp\sess_562f3ba648ebc190d50011c8b45e9209, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Can anyone help??
Thanks
Joki
Look for the session.save_path definition in your php.ini file and set that to the full path of a directory you want to use for storing session data.
The session.save_path will most likely be set to /tmp at the moment so setting it to something like....
session.save_path = "C:\windows\temp"
Should fix your problem.
The session.save_path will most likely be set to /tmp at the moment so setting it to something like....
session.save_path = "C:\windows\temp"
Should fix your problem.
Sessions directory does not exist
I've been unable to resolve this message. I've tried changing "session.save_path" as suggested above but the error persists: Warning: session_start(): open(/tmp\sess_abe4e322cfe4629a5791866fdb65b662, O_RDWR) failed: No such file or directory (2) in e:\easyphp1-7\www\catalog\includes\functions\sessions.php on line 67
Would really appreciate any help
Would really appreciate any help
Your session.save_path is still wrong. Make sure you're editing c:\windows\php.ini , change session.save_path to something like c:\temp (or some other temp directory that exists) then restart apache.
Also check a phpinfo() page ( just <?php phpinfo() ?> in a file ), that will show you the value of session.save_path
Also check a phpinfo() page ( just <?php phpinfo() ?> in a file ), that will show you the value of session.save_path
I found it Mark. I'm running the oscommerce catalog file (http://www.oscommerce.com) When you asked me to insert 'echo ini_get('session.save_path') I found the 'index.html' file & stuck it in there. When that didn't work I got to thinking that there must be another file and there was...configure.php located in ..\catalog\includes. At the very bottom there is: define('STORE_SESSIONS', ' '. The recommendation is to set it to MySQL but I set it to 'e:/easyphp1-7/tmp'); and that did the trick. Appreciate your help very much & hope this post will help someone else out.