Page 1 of 1

[fixed] Failed test for session.save_path on upgrade from b1

Posted: Tue Aug 12, 2014 2:27 pm
by tristan
Hi there,

when trying to upgrade a beta 1 to a beta 2 install it gets stuck on "Step 3 - Tests". Which is somewhat strange since the configuration of this server didn't change. The error is about the session.save_path:

Code: Select all

Testing for proper session capabilities (sessions are using cookies and session save path is writable, etc) 
The session save path variable value is invalid or the directory does not exist
If I remember correctly it wasn't required to have set session.save_path in earlier versions. Will this be a requirement from beta 2 onward?

Cheers,

Tristan

Re: Failed test for session.save_path on upgrade from beta 1

Posted: Fri Aug 15, 2014 8:29 pm
by Rolf
Uhh something changed here related to another recent post. Haven't got it clear on my mind what... Will get back to you on this.

Thx. Rolf

Re: [open] Failed test for session.save_path on upgrade from

Posted: Tue Aug 19, 2014 8:57 am
by tristan
Hi Rolf, thanks for looking into this, how is your mind this week, any insights already maybe?

Re: [open] Failed test for session.save_path on upgrade from

Posted: Sat Aug 30, 2014 5:24 pm
by calguy1000
This test is correct.

The session tests do the following:

check if session save handler is 'files' (meaning session data will be stored in files).
if that is true:
a: check if open basedir restrictions are in effect, if they are... fail.
b: get the session save path (the directory that the session files will be created in)
c: test that the session save path is actually a directory
** this is where your install is failing **
d: test that the php process can write to that directory.

In beta1 these tests were not nearly as extensive.

So at this time, I think that everything is working fine... and that your setup needs some adjustment.

Re: [open] Failed test for session.save_path on upgrade from

Posted: Sun Aug 31, 2014 8:27 pm
by tristan
I agree with you that this test is correct. However, since a lot of shared hosting setups set the actual session.save_path to a location that's not writable for security reasons and since it wasn't a requirement on any CMS Made Simple version before beta 2, I was wondering whether it might be a good idea to make this optional once again or maybe have an option to setup a session.save_path within the install/upgrade script.

Re: [open] Failed test for session.save_path on upgrade from

Posted: Mon Sep 01, 2014 3:08 am
by calguy1000
tristan wrote:... it wasn't a requirement on any CMS Made Simple version before beta 2
This is incorrect. if the session save handler is 'files' CMSMS has always required that the session save path be writeable.

Re: [open] Failed test for session.save_path on upgrade from

Posted: Mon Sep 01, 2014 6:36 am
by tristan
I see. But since the test didn't check whether the path was actually writable before beta 2, on the same host on 1.11.11 for example:

Code: Select all

Checking if session.save_path is writable	You have /tmp Success
I have been successfully running all my CMS Made Simple instances without a writable session.save_path over the last years. So it might be of great use to have the ability to set the session.save_path yourself during install to facilitate installing CMS Made Simple on these kind of shared hosting setups.

Re: [open] Failed test for session.save_path on upgrade from

Posted: Sun Sep 07, 2014 7:11 pm
by 10010110
I just ran into the same issue when I installed beta2 freshly on my local development server. I never had this issue with CMS version 1 and my session.save_path was set to nothing by default (I had to do some research before being able to get this to work).
I’m not sure how this will be on actual live shared servers but I’m afraid that I’m going to run into problems in the future. Is this setting really necessary? :(

Re: [open] Failed test for session.save_path on upgrade from

Posted: Tue Oct 07, 2014 12:26 am
by sugna
CMSMS Beta 2.0
php 5.5.6

I'm having the same issue on Media Temple servers when trying to install.

Everything passes except the "Open basedir restrictions are in effect. CMSMS requires that this be disabled" issue.

I worked with MT tech support and added this line to my .htaccess file

Code: Select all

php_value open_basedir "/dir/dir/data/tmp/:dir/account/domains/domain.com/:/home/account/ domains/domain.com/html/"
and receive the following error:

Fatal Error

Could not find system temporary directory

Code: Select all

Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/path/data/tmp/:/path/:/path/html/) in path/html/cmsms/lib/classes/base/class.utils.php on line 76

Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/path/data/tmp/:/path/:/path/html/) in /path/html/cmsms/lib/classes/base/class.utils.php on line 89
Not sure where to go from here before I contact MT support again.

Re: [open] Failed test for session.save_path on upgrade from

Posted: Tue Oct 07, 2014 1:39 am
by calguy1000
The session save path, and the system temporary directory all need to be writable by the installer. The core also needs the session save path to be writable for sessions to work (if files are to be used as session variables).

The installer uses the system temporary directory to expand a zip file (the zip actually contains the CMSMS core files).

The installer uses sessions so that it can save and retrieve all of your settings entered during the install as you navigate through the pages of the installer.

The core needs session variables.

CMSMS Has never supported open_basedir restrictions. As they cause this problem. (unable to write temporary or session files). look in the forum you will find tonnes of posts where people report problems about open_basedir. We are now just testing for this alot more.

Re: [open] Failed test for session.save_path on upgrade from

Posted: Tue Oct 07, 2014 8:32 am
by tristan
This is just my opinion of course, but since the b1 installer as well as the core and all CMS Made Simple 1.* versions before that were working perfectly fine without a session.save_path set, I think it would be better to at least keep the option in the installer to continue or set a session.save_path manually.

Re: [open] Failed test for session.save_path on upgrade from

Posted: Sat Dec 20, 2014 10:09 pm
by calguy1000
these issues should be fixed in svn.