View Full Version : phpdev session problem
I'm having problems with phpdev and sessions. I can name and start a sesion. But as soon as I try to use the session (eg register a variable), I get an error that it can't open the session file. This happens with any session I attempts to create -- including test files that only (try to) register a session variable. I also don't get an error with a test file on my server -- so that narrows the problem down to the configuration of phpdev.
I've looked in the php.ini file, and it points to the correct directory (It's on the G: drive -- but all driver references have been changed to G: and everything else seems to work properly).
Any suggestions?
Spookster
12-13-2002, 06:54 PM
You do have a temp folder set up for sessions right? There is a line that refers to the location of the temp folder in php.ini.
That was one of the first things I looked at. It's:
session.save_path = G:\phpdev\php\temp;
And the directory does exist, and the security is fine.
firepages
12-14-2002, 10:15 AM
Hi, what OS are you on... 'sometimes ?' on XP you can only appear to use c:\tmp (or g:\tmp etc) as the session save directory and the php.ini session_save_path is ignored ? dont ask me why cos I have not a clue
It's on win2k, but it does give me an error that uses tmp\ in the filename. I'll create G:\tmp and see if that works. If not, C:\tmp. I'll let you know if it works.
Thanks.
No luck. I get the same error:
open(/tmp\sess_8b0742b34ba0f98e5d5d3981f577f250, O_RDWR) failed.
The file does now exist (in G:\tmp): the problem seems to be the forward-slash -- this seems to upset Bill for some reason.
Any other ideas?
Nightfire
12-14-2002, 03:51 PM
I had the same problem on win98, I ended up downloading php, apache and mysql from the sites and installing them on my pc.
Spookster
12-14-2002, 09:51 PM
Originally posted by Nightfire
I had the same problem on win98, I ended up downloading php, apache and mysql from the sites and installing them on my pc.
I installed phpdev on both win98 and winXP and didnt have any problem other than making sure the tmp folder existed and it was pointed to correctly in the php.ini file.
firepages
12-15-2002, 02:47 AM
kiwi , run this as phpinfo.php
<?phpinfo();?>
in the first section it should tell you where your php.ini is located. (Configuration File (php.ini) Path ..... some value)
if your system root is c:\(i.e. if windows lives on c:\) then thats where your php.ini should be (c:\winnt\php.ini) , it needs to be there regardless of where the rest is installed.
if your php.ini is in the right place then I dont know what the issue is :confused:
- note that PHP is not worried about forward and backslashes in the configuration files , i.e. c:\phpdev\php/tmp is perfectly valid.
Got it. You might like to know the solution (it's a little wierd).
phpinfo told me that the ini file was in C:\winnt (a folder that doesn't exist). I created it, and copied the php.ini file there. That didn't work. When I copied the php.ini file back to G:\winnt, it worked. It seems as if php reports "c:" for the system root on windows, irrspective of what the system root actually is.
Anyway, the problem is solved, so it's working now.
Thanks.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.