Forum Moderators: coopster

Message Too Old, No Replies

Local apache server error, but ok when hosted

sessions brings errors only on local computer

         

proper_bo

6:39 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



Hello all,

I have just used a script that includes the first line

session_start();

On my computer where I have apache php and mysql installed I get the error:

Warning: session_start(): open(/tmp\sess_4e8a9cf51a21ab1c9fe26630d5446262, O_RDWR) failed: No such file or directory (2) in c:\server\apache\htdocs\ma\index.php on line 2

But when I upload it to my host the page works without errors. Is there a problem with my apache setup or is it a php thing?

Thank you

sorry if this should be in the php forum.

gergoe

6:42 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



This is strictly related to php, but first check out the session.save_path ini variable on the [php.net...] page, before asking the same thing on the php forum.

proper_bo

6:44 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



Ok thank you.

Could someone please move this to the php forum then to save me posting a second identical post?

[edited by: tedster at 7:33 pm (utc) on Oct. 26, 2004]
[edit reason] moved to PHP forum [/edit]

paladin

7:36 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



It mean that there is no "/tmp/" folder to save the session data. I am pretty sure the error will dissapear when you create the folder.

proper_bo

8:40 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



So I need to make a /tmp/ folder in the folder where the site files are stored?

paladin

10:18 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



I would say in the root of the system, not the site

coopster

10:58 pm on Oct 26, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



gergoe set you on the right track, follow the link that gergoe offered.

proper_bo

11:19 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



Would just like to say thank you to gergoe and coopster for your help. I always prefer to be pointed in the right direction rather than given the answer. After reading that page I managed to get it all working.

For those who read this looking for the answer you need to go to php.ini and change the location of the /tmp/ file to an actuall location on your computer eg: c:/temp/

Thank you again.

coopster

11:55 pm on Oct 26, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You bet. Nice job, by the way ;)