Page 1 of 1

session.save_path problem [resolved]

Posted: Mon Jul 31, 2006 2:55 pm
by marccouture
My hoster turns off this option, as it is seen as a potential security issue.  Is there a workaround to making CMSMS work without this option turned on?

Thanks...

Re: session.save_path problem

Posted: Mon Jul 31, 2006 5:31 pm
by cyberman
Have you tried to switch on with php_flag on .htaccess?

Re: session.save_path problem

Posted: Tue Aug 01, 2006 2:33 pm
by marccouture
cyberman wrote: Have you tried to switch on with php_flag on .htaccess?
No, can you describe exactly what I need to do to test this?

Thanks for the quick reply!


EDIT: after a few Google searches, I tried creating a .htaccess file with the following info in the file, but I get a HTTP 500 server error (I put this file at the root of my CMS, is the path ok?):

php_value session.save_path "/cmsmadesimple/"
php_flag register_globals off

Re: session.save_path problem

Posted: Tue Aug 01, 2006 4:10 pm
by cyberman
marccouture wrote: No, can you describe exactly what I need to do to test this?
Only sometimes (not every times) it is possible to overwrite providers settings  ::).
but I get a HTTP 500 server error
Means internal server error - reasons can be a "wrong" server config or a mistake in writing in .htaccess.
is the path ok?):
Yes it should ...

Code: Select all

php_value session.save_path "/cmsmadesimple/"
php_flag register_globals off
The path means the temp folder for server, not for CMSms. By default it should be

Code: Select all

php_value session.save_path "temp"

Re: session.save_path problem

Posted: Tue Aug 01, 2006 8:11 pm
by Elijah Lofgren
marccouture wrote: My hoster turns off this option, as it is seen as a potential security issue.  Is there a workaround to making CMSMS work without this option turned on?

Thanks...
This may work:

Open include.php and add the following lines to the top of it after the <?php

Code: Select all

$dirname = dirname(__FILE__);
session_save_path($dirname.'/tmp/cache');
The top of the file should then look like this:

Code: Select all

<?php
$dirname = dirname(__FILE__);
session_save_path($dirname.'/tmp/cache');

#CMS - CMS Made Simple
Let us know if this works and we may be able to add a workaround like this for people that run into the same problem that you have.

Re: session.save_path problem

Posted: Sat Nov 03, 2007 12:39 am
by calguy1000
a) this could go into the config.php (to make upgrading a bit easier).

and

b) make it an @session_save_path($dirname.'/tmp/cache');

just incase your host is gonna disagree with the command, at least you won't get any gnarly errors.

Re: session.save_path problem [resolved]

Posted: Wed Jul 02, 2008 7:16 pm
by mechatech
calguy1000 wrote: a) this could go into the config.php (to make upgrading a bit easier).

Just ran into the problem today.
How would this go into the config.php? Anyone have an example of this

Thanks a lot!

Re: session.save_path problem

Posted: Wed Apr 08, 2009 5:35 pm
by Owens
Elijah Lofgren wrote: Let us know if this works and we may be able to add a workaround like this for people that run into the same problem that you have.
This worked for me... just upgraded to PHP5, and a couple of things broke, but this fixed the session problems. Thanks.