Session variables not passing over

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
SoreE yes
Forum Commoner
Posts: 32
Joined: Wed Oct 11, 2006 3:59 am

Session variables not passing over

Post by SoreE yes »

Hi, my session variables are not passing over. Instead I get an error message:

Warning: session_start() [function.session-start]: open(/tmp\sess_186317b6a3ef60f4efa1a834b9203d10, O_RDWR) failed: No such file or directory

I notice that in the php.ini file, it states:

Code: Select all

; Argument passed to save_handler.  In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this 
; variable in order to use PHP's session functions.
session.save_path = /tmp
I am using Windows, but don't know what to change it to. Any ideas? Thanking you in advance.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You need to change it to the path of a folder in which you want to save session files - this can be an existing folder or one you create specifically for the job. If you're installing on a server you also need to make sure that the folder is writeable.

So you could have something like:

Code: Select all

session.save_path = c:/php/temp
Mac
SoreE yes
Forum Commoner
Posts: 32
Joined: Wed Oct 11, 2006 3:59 am

Problem solved

Post by SoreE yes »

Thanks twigley, that worked a treat.
Post Reply