cancel
Showing results for 
Search instead for 
Did you mean: 

session.save_path in custom php.ini

Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

session.save_path in custom php.ini

If you picked up a copy of the php.ini file posted <a href="http://community.plus.net/forum/index.php/topic,83568.msg696223.html#msg696223">here</a> before today (22/03/10), the session.save_path will need to be changed either to a custom sessions folder of your own or to /tmp or it is likely to cause problems.
Sorry, I should have thought of that earlier.  Embarrassed
To find the absolute path to your file space needed for a custom save path, you can place a phpinfo() file

<?php
phpinfo();
?>

next to you php.ini file, set permissions to 0700 and call it in a browser, then look against "Loaded Configuration File".
Sorry if that caused problems for anyone!
Gabe
Edit: more informative subject line added
7 REPLIES 7
whsupermarket
Newbie
Posts: 2
Registered: ‎24-03-2010

Re: php.ini problem: apologies

i am sorry, but i have no idea how to fix this problem. Can you please provide a step by step guide?? Many thanks!!
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: php.ini problem: apologies

Open the php.ini file in a text editor, scroll down to session.save_path and if it doesn't already say session.save_path = /tmp, change it to session.save_path = /tmp
If you had a problem with sessions dropping, that should fix it.
If you want to use your own custom sessions folder, you can create one in your filespace and use the absolute path to that filespace instead of /tmp. You can find the absolute path either as mentioned above or using a bash script with the pwd command.
Gabe
whsupermarket
Newbie
Posts: 2
Registered: ‎24-03-2010

Re: php.ini problem: apologies

thanks for your reply, but i am using the PlusNet CCGI platform. Am i allowed to do this?Huh
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: php.ini problem: apologies

Quote from: whsupermarket
i am using the PlusNet CCGI platform. Am i allowed to do this?Huh

It's a custom php.ini to be placed in your own filespace. Yes you are allowed to do this. You only need to do this if you have/want to override any of the values in the global php.ini.
Gabe
stuartp
Grafter
Posts: 54
Registered: ‎06-08-2007

Re: php.ini problem: apologies

Hi Gabe,
With php.ini pointing to /tmp as the sessoion_save path I get this error from one of my apps:

ERROR 2: session_start() [function.session-start]: open(/tmp/sess_86aad15e1b2a1d921b116618f44606c5, O_RDWR) failed: File too large (27)
The session files are only 200 or so bytes so how can they be too big  Huh
If I configure my php.ini to save sessions to within my filespace everything works.    I'm happy to do this but worried that my filestore allocation will be compromised if they build up too much.

Stuart
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: php.ini problem: apologies

Quote from: stuartp
With php.ini pointing to /tmp as the sessoion_save path I get this error from one of my apps

I think there maybe a bit of /tmp snafu at the moment.  Sad
I hope that if Plusnet can revert to /var/lib/php5 for sessions they will.
Gabe
stuartp
Grafter
Posts: 54
Registered: ‎06-08-2007

Re: php.ini problem: apologies

Quote
I think there maybe a bit of /tmp snafu at the moment.  Sad
I hope that if Plusnet can revert to /var/lib/php5 for sessions they will.

Oh well, at least its not something I've broken  Cheesy
Stuart