Page 1 of 2

Session_save_path is writeable

Posted: Fri Mar 04, 2016 1:54 am
by webguru
I am trying to upgrade a clean install of 1.12.1 which was from the Installatron on the Omnus server that my client is on. It was installed with content and nothing has been altered.

Immediately, I tried to install 2.1.2 from ftp'ing the files to the server and I get this error on page 3:

Session_save_path is writeable
The session save path directory is not writeable


After talking with the hosting company and doing extensive reading to figure out how to fix it, I'm at a bit of a dead-end, although I feel a lot more educated on the matter.

I read in the DOCS about Checking if session.save_path is writable and adding this line to the php.ini:
session.save_path = <install dir>/tmp/cache

This might be the answer, but I can't find a php.ini file anywhere.

So my questions are:

1. Am I supposed to create one and enter that line?
2. If so, what is the install directory and how do I code it exactly?
3. Where do I put the php.ini file?

I realize this forum likes questions asked in a certain manner and I hope I'm being clear in the question and what I've done to research it.

Below is my phpinfo page that shows what I think you need:
1. Configuration File (php.ini) Path: /etc/php70
2. Loaded Configuration File: /webroot/u/m/umcwv001/websiteaddress.org/.config/php.ini
3. session.save_handler: files
4. open_basedir: no value

In reply to #1 above, there is no php.ini file in the page.
In reply to #2 above, the .config is a hidden file and I do not have access to it according to the hosting company.

Thank you for any assistance and lastly, here is the System Information:

Cms Version: 1.12.1

Installed Modules:

CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.5
MenuManager: 1.8.7
MicroTiny: 1.2.9
ModuleManager: 1.5.8
News: 2.15.2
Search: 1.7.13
ThemeManager: 1.1.8


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 32000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 7.0.3
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 180
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 32M
upload_max_filesize: 32M
session_save_path: /clfs/sessions (0755)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.43
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages
Server Time Diff: No filesystem time difference found

Re: Session_save_path is writeable

Posted: Tue Mar 08, 2016 9:16 pm
by webguru
Can anyone help me? Any thoughts?

Omnis.com is my clients hosting company and they are no help at all. I can't install it fresh, manually, nor do an upgrade to the Installatron version.

Appreciate any assistance.

Re: Session_save_path is writeable

Posted: Wed Mar 09, 2016 6:05 am
by Jeff
According to the system info you pasted.
session_save_path: /clfs/sessions (0755)
If PHP is ran as the owner of that dir than you are fine. If not tell your hosted they need to fix the php setting so the PHP user can write to it.

Re: Session_save_path is writeable

Posted: Wed Mar 09, 2016 11:15 pm
by webguru
Thanks, Jeff...

Unfortunately, the techs at Omnis.com are telling me the path IS writable and have confirmed it.

I have used this upgrade to 2.1.2 on other hosting companies without issue. The option of moving off this hosting company is not my choice.

The tech at Omnis said he tried installing it on one of his servers at omnis and got the same error, but that he has other CMS programs installed without issue.

I just tried even installing 2.1.1 with the same error.

Is there something I can add to the htaccess file or some other way of getting around it?

Thanks for your response.

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 10:24 am
by Jeff
Are you installing using the phar file? If yes try the expanded zip.

If that doesn't work try installing the site on another server and moving it to the hosting provider.

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 11:33 am
by velden
What happens when you create a .php file with contents below and open that in browser?

Code: Select all

<?php

   $path = ini_get('session.save_path');
   echo $path.'<br/>';
   var_dump(is_writable($path));

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 6:20 pm
by webguru
Jeff,
I am installing from the expanded file, but I will give yours an attempt.

Velden,
I get this:
2;/clfs/sessions
bool(false)

What does it mean?

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 6:46 pm
by velden
Please try this code:

Code: Select all

<?php

   $path =  _get_session_save_path();
   echo $path.'<br/>';
   var_dump(is_writable($path));


   function _get_session_save_path()
    {
        $path = ini_get('session.save_path');
        if( ($pos = strpos($path,';')) !== FALSE) $path = substr($path,$pos+1);

        if( $path ) return $path;
    }
It's about the same test as the installer seems to do.

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 7:43 pm
by Jeff
See if this variation changes anything. (I added a '/' to the end of the path)

Code: Select all

<?php

   $path =  _get_session_save_path();
   echo $path.'<br/>';
   var_dump(is_writable($path.'/'));


   function _get_session_save_path()
    {
        $path = ini_get('session.save_path');
        if( ($pos = strpos($path,';')) !== FALSE) $path = substr($path,$pos+1);

        if( $path ) return $path;
    }

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 8:08 pm
by webguru
In regards to the last one, I get the following:

/clfs/sessions
bool(false)

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 8:12 pm
by Jeff
Show that to the hosting company and see if they can explain it.

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 8:15 pm
by velden
Please test my code first too.
Not sure if that should differ but it's closer to what the installer does.

Code: Select all

<?php

   $path =  _get_session_save_path();
   echo $path.'<br/>';
   var_dump(is_writable($path));


   function _get_session_save_path()
    {
        $path = ini_get('session.save_path');
        if( ($pos = strpos($path,';')) !== FALSE) $path = substr($path,$pos+1);

        if( $path ) return $path;
    }
If that fails too ('bool(false)') ask your provider like Jeff suggests.

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 8:58 pm
by webguru
Both tests show the same results:
/clfs/sessions
bool(false)

Thank you both, but I don't understand what this tells me, or them for that matter. Can you elaborate?

Thanks

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 9:13 pm
by velden
Unfortunately, the techs at Omnis.com are telling me the path IS writable and have confirmed it.
That code shows the session.save_path is NOT writable. At least not by your php scripts.
So, show the script to the techs and ask if they can explain the results.

Re: Session_save_path is writeable

Posted: Thu Mar 10, 2016 9:15 pm
by webguru
Ah....

Much appreciation to you both!

I will let you know what they say.