installing 5.7.4

Permalink
I get the following error while installing 5.7.4

is_dir(): open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts/set-s.net/:/tmp/).

Trace:
#0 [internal function]: Whoops\Run->handleError(2, 'is_dir(): open_...', '/var/www/vhosts...', 51, Array) #1 /var/www/vhosts/set-s.net/httpdocs/concrete/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php(51): is_dir('/var/lib/php/se...') #2 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Session/Session.php(34): Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler->__construct() #3 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Session/SessionServiceProvider.php(15): Concrete\Core\Session\Session::start() #4 /var/www/vhosts/set-s.net/httpdocs/concrete/vendor/illuminate/container/Illuminate/Container/Container.php(498): Concrete\Core\Session\SessionServiceProvider->Concrete\Core\Session\{closure}(Object(Concrete\Core\Application\Application), Array) #5 /var/www/vhosts/set-s.net/httpdocs/concrete/vendor/illuminate/container/Illuminate/Container/Container.php(425): Illuminate\Container\Container->build(Object(Closure), Array) #6 /var/www/vhosts/set-s.net/httpdocs/concrete/vendor/illuminate/container/Illuminate/Container/Container.php(809): Illuminate\Container\Container->make('session') #7 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Support/Facade/Facade.php(43): Illuminate\Container\Container->offsetGet('session') #8 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Support/Facade/Facade.php(105): Concrete\Core\Support\Facade\Facade::resolveFacadeInstance('session') #9 /var/www/vhosts/set-s.net/httpdocs/concrete/src/User/User.php(203): Concrete\Core\Support\Facade\Facade::__callStatic('has', Array) #10 /var/www/vhosts/set-s.net/httpdocs/concrete/src/User/User.php(203): Concrete\Core\Support\Facade\Session::has('uID') #11 /var/www/vhosts/set-s.net/httpdocs/concrete/src/User/User.php(52): Concrete\Core\User\User->__construct() #12 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Package/StartingPointPackage.php(341): Concrete\Core\User\User::getByUserID(1, true, false) #13 [internal function]: Concrete\Core\Package\StartingPointPackage->add_users() #14 /var/www/vhosts/set-s.net/httpdocs/concrete/controllers/install.php(264): call_user_func(Array) #15 [internal function]: Concrete\Controller\Install->run_routine('elemental_full', 'add_users') #16 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Controller/AbstractController.php(156): call_user_func_array(Array, Array) #17 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Routing/ControllerRouteCallback.php(25): Concrete\Core\Controller\AbstractController->runAction('run_routine', Array) #18 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Routing/Router.php(59): Concrete\Core\Routing\ControllerRouteCallback->execute(Object(Concrete\Core\Http\Request), Object(Concrete\Core\Routing\Route), Array) #19 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Support/Facade/Facade.php(119): Concrete\Core\Routing\Router->execute(Object(Concrete\Core\Routing\Route), Array) #20 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Application/Application.php(368): Concrete\Core\Support\Facade\Facade::__callStatic('execute', Array) #21 /var/www/vhosts/set-s.net/httpdocs/concrete/src/Application/Application.php(368): Concrete\Core\Support\Facade\Route::execute(Object(Concrete\Core\Routing\Route), Array) #22 /var/www/vhosts/set-s.net/httpdocs/concrete/bootstrap/start.php(217): Concrete\Core\Application\Application->dispatch(Object(Concrete\Core\Http\Request)) #23 /var/www/vhosts/set-s.net/httpdocs/concrete/dispatcher.php(36): require('/var/www/vhosts...') #24 /var/www/vhosts/set-s.net/httpdocs/index.php(2): require('/var/www/vhosts...') #25 {main}

admin1234
 
WebcentricLtd replied on at Permalink Reply
hi I'd get in touch with your host.

Concrete5 wants to write session info to disk but your 'website' is not allowed to write in the session directory thst is set up.

Either concrete5 needs to be able to write to that directory or the session directory needs to be set to somewhere it can write to outside of your web root.
admin1234 replied on at Permalink Reply
admin1234
thanks for the reply

do you know where can I change the session directory - I'm using plesk?

please let me know

rgds
rob
WebcentricLtd replied on at Permalink Reply
the session savepath in your php.ini if you have access to it.

You need to create a directory somewhere where your website can write to it.

The open basedir restriction sounds more like you are on shared hosting though.
dan1991 replied on at Permalink Reply
I'm having a similar problem with 5.7.4.2, did you ever find a solution to this?
admin1234 replied on at Permalink Reply
admin1234
yes

I had to install PHP mCrypt
and there is no problem with installation

rgds
r
PJSAndo replied on at Permalink Reply
I'm having this problem as well.

Anyone find a solution?
chemmett replied on at Permalink Reply
chemmett
I solved this on our Plesk server by using database instead of file-based sessions. See here:https://www.concrete5.org/documentation/how-tos/developers/enable-da...

Just create the /application/config/concrete.php file with that content, and re-run the install and it'll use the database for sessions so you don't have to worry about session.save_path or open_basedir.
TorstenKelsch replied on at Permalink Reply
TorstenKelsch
This happened to me too, but with concrete5 8.1.0 – but only while installing into a subdomain. So this seems to have to do with certain restrictions by the webhoster, Plesk, PHP or whatever.

Creating a file concrete.php in application/config with the following code might help, as chemmet already said:

<?php 
   return array(
       'session' => array(
           'handler' => 'database'
       )
   );
?>
.