Issue installing Concrete5 5.7.4.2

Permalink
Hi all,

Has anybody had the issue I've had below? I've tried installing the latest version of Concrete5, entered the username and db etc but when it tries to install the site I get the following error. Anybody know what's causing it? How it can be fixed?

Thanks!

Invalid argument $savePath

 
andyd8 replied on at Permalink Best Answer Reply
Issue fixed (with help). Had to swap file based sessions to database sessions by changing the /concrete/config/concrete.php.php file and change the session handler to 'handler' => 'database'.
SmoothPixel replied on at Permalink Reply
SmoothPixel
Thanks for posting your solution. I came across this issue yesterday when trying a test install.

My web host's support guys were great and solved the problem. When I asked for more info they said:

"At the moment you have to comment out the line that tries to force the save handler to files since that isn't compatible with the memcached save path in the default php config."

I asked which file they had commented out but they haven't got back to me yet. Interestingly, I checked the config file and the line is uncommented and still showing:

'handler' => 'file',

but the site is working!

Anyway, it might be a conflict with Memcache (or other file caching) that causes the problem.
fivepints replied on at Permalink Reply
fivepints
hi,

i also tried making this edit. didnt work for me sadly. so lets hope our friend gets a response soon....

pat
SmoothPixel replied on at Permalink Reply
SmoothPixel
Okay, I got a follow up from my support guys:

"It's here and it's any instance of session.save_handler:

concrete/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php"

Basically, they commented out lines 375 to 382 of the above PHP file, as follows:

$this->saveHandler = $saveHandler;
        if ($this->saveHandler instanceof \SessionHandlerInterface) {
            if (PHP_VERSION_ID >= 50400) {
                session_set_save_handler($this->saveHandler, false);
            } else {
                /*session_set_save_handler(
                    array($this->saveHandler, 'open'),
                    array($this->saveHandler, 'close'),
                    array($this->saveHandler, 'read'),
                    array($this->saveHandler, 'write'),
                    array($this->saveHandler, 'destroy'),
                    array($this->saveHandler, 'gc')
                );*/
            }
session.save_handler


However, hacking the core code like this (and @andyd8's fix above) is not best practice. If you upgrade your Concrete5 install, you will overwrite the fix and break your site.

I'm no expert with C5.7 (things have changed a lot since C5.6) but I believe that overrides should be written in application/config/app.php.

Also, setting

'handler'      => 'database'


may not be correct for your environment. For my remote setup it would need to be set to 'memcache'.

When I've got time I will investigate the 'correct way' to do this and report back. Hopefully, I've given @fivepints enough info to get things working in the meantime.
andyd8 replied on at Permalink Reply
Thanks for the replies guys (and sorry late getting back to you). Sounds like it needs a different workaround depending on the server environment : S , not ideal! Hopefully the issue will be resolved.

Thanks again for getting back to me.
maffp replied on at Permalink Reply
I managed to get it to work by using the /concrete/config/concrete.php edit but does this mean it will get overidden at every update? Why does this happen?... it never happened on my old server...
MrKDilkington replied on at Permalink Reply
MrKDilkington
@maffp
Any changes made to files inside the concrete folder will be overridden or overwritten when you update concrete5.

This tutorial explains how to make the change in the application folder:
"Enable Database Based Sessions on 5.7"
http://documentation.concrete5.org/tutorials/enable-database-based-...
- if you don't have application/config/concrete.php available, you can create the file
TMDesigns replied on at Permalink Reply
TMDesigns
The concrete.php didn't work for me the commenting out did

Will this slow down the site at all?