session.save_path problem [resolved]

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
marccouture

session.save_path problem [resolved]

Post 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...
Last edited by marccouture on Sat Nov 03, 2007 12:50 am, edited 1 time in total.
cyberman

Re: session.save_path problem

Post by cyberman »

Have you tried to switch on with php_flag on .htaccess?
marccouture

Re: session.save_path problem

Post 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
Last edited by marccouture on Tue Aug 01, 2006 2:49 pm, edited 1 time in total.
cyberman

Re: session.save_path problem

Post 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"
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: session.save_path problem

Post 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.
Last edited by Anonymous on Sat Nov 03, 2007 12:10 am, edited 1 time in total.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: session.save_path problem

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
mechatech
Forum Members
Forum Members
Posts: 51
Joined: Thu Oct 25, 2007 5:49 pm

Re: session.save_path problem [resolved]

Post 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!
Last edited by mechatech on Wed Jul 02, 2008 7:19 pm, edited 1 time in total.
User avatar
Owens
Forum Members
Forum Members
Posts: 97
Joined: Thu Dec 27, 2007 11:29 pm

Re: session.save_path problem

Post 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.
Post Reply

Return to “Developers Discussion”