NuSphere Forums
 start_session() problem

 Joined: 21 Jul 2003 Posts: 14 Location: Berkeley
 Posted: Sat Sep 27, 2003 8:22 pm
When I run the following code inside the php IDE...

<?php

session_start();

?>

I get the following errors:

Warning: session_start(): open(/tmp\sess_60a77f03ceca8ef77695a2370313018d, O_RDWR) failed: No such file or directory (2) in X:\ARC\__admin\noname1.php on line 3

Warning: Unknown(): open(/tmp\sess_60a77f03ceca8ef77695a2370313018d, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

What do you think the problem could be?

Elliot

 Joined: 21 Jul 2003 Posts: 14 Location: Berkeley
 Posted: Sat Sep 27, 2003 10:24 pm
Hi ddmitrie and gang,

I managed to figure it out! I am on a Windows machine and a line in php.ini file needed to be changed to reflect the location of the temporary directory on my machine:

The following line...

 Quote: session.save_path = /tmp

needed to be changed to...

 Quote: session.save_path = "C:\WINDOWS\Temp"

'
Elliot

 Joined: 13 Jul 2003 Posts: 7917
 Posted: Sun Sep 28, 2003 5:31 am
you're right.

btw, do you run php shipped with phped ?
I remember we fixed this problem. The default php.ini contains wrong setting and we have corrected it, at least should be in phped 3.2 update pack #1.

 Joined: 21 Jul 2003 Posts: 14 Location: Berkeley
 Posted: Sun Sep 28, 2003 2:07 pm
Yup, I haven't installed the update pack yet. I have been having problems with my login, so I haven't been able to download it, but I just got an email from Jay Park stating that the problem is fixed. So, I will download and install it today.

 Joined: 13 Jul 2003 Posts: 7917
 Posted: Sat Jan 10, 2004 3:04 pm
session_start() can't be called from a freely selected location. Take a look at the php documentation for the details.
 Re: I get the same errors

 Joined: 21 Nov 2003 Posts: 39
 Posted: Sat Jan 10, 2004 3:05 pm
 ja1clark wrote: ... session.save_path = "C:\Program Files\nusphere\apache\logs\sessions" and the durcetory is there. Warning: session_start(): open(C:\Program Files\nusphere\phpED\php\sessions\sess_b662ba92968fc6f89574a6c2cb0fd27d, O_RDWR) failed: No such file or directory (2) in C:\Program Files\nusphere\apache\htdocs\Source\authorised.php on line 2 ...

You are looking at the wrong php.ini because the php you are using is looking for C:\Program Files\nusphere\phpED\php\sessions (which doesn't exist), not C:\Program Files\nusphere\apache\logs\sessions (which exists)

 Joined: 13 Jul 2003 Posts: 7917
 Posted: Sat Jan 10, 2004 3:10 pm
if you use TechPlatform take a look at
 Code: C:\Program Files\nusphere\apache\php.ini
file

if you run SRV server you should take a look in
 Code: C:\Program Files\nusphere\phpED\php\php.ini
file.

then make sure that the directory specified as session.save_path exists.

Last edited by dmitri on Sun Jan 11, 2004 3:16 pm; edited 1 time in total

 Joined: 21 Nov 2003 Posts: 39
 Posted: Sat Jan 10, 2004 3:13 pm
it seems he/she is looking at TP's php.ini while actually using SRV's php.ini. so probably he/she should use TP's apache server as server or continue to use SRV and create the "sessions" folder in C:\Program Files\nusphere\phpED\php
 Solved

 Joined: 20 Nov 2003 Posts: 4
 Posted: Sat Jan 10, 2004 3:15 pm
so when I delved deeper I was looking at the wrong php.ini file - I was looking under apache and not phped. I still had to manually add the sessions directory however.

Perhaps this was caused by my confusion about the apache server - I have it installed as a service and automatically running. Is this necessary for debugging or does the debugger start up an instance by itself when invoked? Is this why there is a separate php.ini in the phped directory?
 start_session() problem
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forum All times are GMT - 5 Hours   Page 1 of 1

 Select a forumGeneral FAQPhpED PHP IDEPHP Debugger DBGFeature Request for PhpEDPhpED Integration scriptsNuCoder PHP Encoding SolutionPhpExpress PHP Accelerating SolutionPhpDock PHP DeploymentNuSoap Soap LibraryTechPlatform SupportFeature RequestUnrelated discussions