Jump to content

[SOLVED] How do I change the session save path???


poleposters

Recommended Posts

I've been having some problems with my sessions. They appear and vanish randomly as I refresh the browser.I've checked my code and it looks fine. Everything works without error on my localhost, except when I upload the scripts onto my web server the sessions behave strangely.

 

I've checked out the faq on my webhost page and it tells me I need to save the session path to the directory

 

/clientdata/clients/first-letter-of-your-domain/

second-letter-of-your-domain/your-domain/www/

 

Instead of /tmp

 

They have suggested I insert this code.

 

ini_set("session.save_handler", "files");

session_save_path ("path_to_temp_dir/");

 

However they haven't specified where I insert the code.

 

Can anyone help? I've sent them an email but need to get this sorted as soon as possible.They'll probably take days.

Thank you for your replies, but I solved it. I tried every which combination.

 

I had to place it before my session starts.

 

Phew! I've been building this site for months and this would of been a nightmare if I couldn't get it to work.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.