J4 Issue ?
avatar OrgasmicSweets
OrgasmicSweets
21 Jun 2018

Steps to reproduce the issue

Upload Joomla 4 Install files and navigate to the directory

Expected result

Show Install Page

Actual result

Error An error has occurred while processing your request. 0 Could not create session directory "/var/lib/php/session"

System information (as much as possible)

Plesk Control Panel
Cento OS 7
PHP 7.1

Additional comments

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
1.00

avatar OrgasmicSweets OrgasmicSweets - open - 21 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jun 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Jun 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Jun 2018
Category Administration
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Jun 2018
Title
Issue installing Joomla 4 Plesk
[4.0] Issue installing Joomla 4 Plesk
avatar joomla-cms-bot joomla-cms-bot - edited - 21 Jun 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Jun 2018

Changed Title to show Issue is about 4.0.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20821.

avatar Twincarb
Twincarb - comment - 21 Jun 2018

Confirmed issue on my plesk server, the following error is shown in the php error log.

[21-Jun-2018 10:16:12] WARNING: [pool testbed.example.co.uk] child 29054 said into stderr: "NOTICE: PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts/example.co.uk/:/tmp/) in /var/www/vhosts/example.co.uk/testbed.example.co.uk/libraries/vendor/joomla/session/src/Handler/FilesystemHandler.php on line 53"

[21-Jun-2018 10:16:12] WARNING: [pool testbed.example.co.uk] child 29054 said into stderr: "NOTICE: PHP message: PHP Warning: mkdir(): open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts/example.co.uk/:/tmp/) in /var/www/vhosts/example.co.uk/testbed.example.co.uk/libraries/vendor/joomla/session/src/Handler/FilesystemHandler.php on line 55"

The value for open_basedir = {WEBSPACEROOT}{/}{:}{TMP}{/}

the exact same webhost has no issues with a J3.8 install


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20821.

avatar Twincarb
Twincarb - comment - 21 Jun 2018

Changing open_basedir = none allows the install to carry on


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20821.

avatar Twincarb
Twincarb - comment - 21 Jun 2018

Changing open_basedir = none allows the install to carry on


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20821.

avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Jun 2018
Status New Discussion
avatar brianteeman brianteeman - change - 22 Jun 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 22 Jun 2018
avatar brianteeman
brianteeman - comment - 15 Jul 2018

@Kubik-Rubik could you take a look at this please

avatar Kubik-Rubik
Kubik-Rubik - comment - 15 Jul 2018

@brianteeman Yes, I will check tomorrow morning. Thank you for mentioning me!

avatar brianteeman
brianteeman - comment - 15 Jul 2018

if there is a plesk expert then we should take advantage of their expertise - thanks buddy

avatar Kubik-Rubik
Kubik-Rubik - comment - 16 Jul 2018

Okay, just analysed it in detail, this happens due to security restrictions in Plesk's PHP handler.

You need to add the path /var/lib/php/session to the open_basedir value to be able to start the installation process in Joomla! 4.

Go to the PHP settings and change the open_basedir value to:

{WEBSPACEROOT}{/}{:}{TMP}{/}{:}{/}var{/}lib{/}php{/}session{/}

TODO We should check why this is required in Joomla! 4 but not in all previous versions!

Before:

screenshot 2018-07-16 13 07 56

After:

screenshot 2018-07-16 13 11 40

See here for more information: https://support.plesk.com/hc/en-us/articles/115000278993-A-website-hosted-in-Plesk-is-not-accessible-open-basedir-restriction-in-effect

EDIT

We get the path diretly from the PHP settings (libraries/vendor/joomla/session/src/Handler/FileSystemHandler.php):

$path = $path ?: ini_get('session.save_path');

and the path is pre-defined to /var/lib/php/session which is not writeable due to the restriction mentioned above.

Hmm, I will report this internally to Plesk's dev team and see what we can do here! Thank you for reporting this.

avatar brianteeman
brianteeman - comment - 23 Jul 2018

@Kubik-Rubik Is there anything "we" need to do

avatar Kubik-Rubik
Kubik-Rubik - comment - 23 Jul 2018

@brianteeman Not at the moment, I'm still on this topic internally. I will keep you informed here!

avatar brianteeman
brianteeman - comment - 23 Jul 2018

great - thanks

avatar wilsonge wilsonge - close - 6 Nov 2018
avatar wilsonge
wilsonge - comment - 6 Nov 2018

Assuming there's not much more to be done here so closing

avatar wilsonge wilsonge - change - 6 Nov 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-11-06 23:27:37
Closed_By wilsonge
avatar StefanSTS
StefanSTS - comment - 21 Mar 2019

Hello,

I like to reopen this issue, since it is still ongoing in Joomla 4 Alpha 7.

The var/lib/php/sessions directory can be only read by root in Ubuntu 16.04. and Plesk.

A trace of the issue looks like this:

(1/1) RuntimeException
Could not create session directory "/var/lib/php/sessions"

in FilesystemHandler.php line 57
at FilesystemHandler->__construct('/var/lib/php/sessions')
in SessionFactory.php line 80
at SessionFactory->createSessionHandler(array('force_ssl' => false, 'name' => 'ea09bb364ef1bffd889e76b7a59035fc', 'expire' => 900))
in Session.php line 114
at Session->Joomla\CMS\Service\Provider{closure}(object(Container))
in Resource.php line 175
at Resource->getInstance()
in Container.php line 96
at Container->get('Joomla\Session\SessionInterface')
in Application.php line 53
at Application->Joomla\CMS\Installation\Service\Provider{closure}(object(Container))
in Resource.php line 175
at Resource->getInstance()
in Container.php line 96
at Container->get('Joomla\CMS\Installation\Application\InstallationApplication')
in app.php line 65
at require_once('/var/www/vhosts/sts-xxxxxx.de/php7x.sts-xxxxxxx.de/j4/installation/includes/app.php')
in index.php line 36

Since this is a standard setting in Plesk that seems to be set for security reasons, I guess another approach is necessary to address this problem. Setting another directory "session" with less secure settings seems like circumventing security.

This issue was not present in J 4 Alpha 4 if I am not mistaken, I happen to install only J 4 Alpha 7 on the same server after Alpha 4. The server is running J 3 versions without any issues.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20821.

avatar wilsonge wilsonge - change - 21 Mar 2019
Status Closed New
Closed_Date 2018-11-06 23:27:37
Closed_By wilsonge
avatar wilsonge wilsonge - reopen - 21 Mar 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Status New Discussion
avatar Pinkeltje
Pinkeltje - comment - 4 Jul 2019

Same here with version alpha 11.
Direct Admin
PHP 7.2.16

avatar wilsonge
wilsonge - comment - 4 Jul 2019

@Kubik-Rubik is there any plans from plesk on this subject?

avatar Kubik-Rubik
Kubik-Rubik - comment - 4 Jul 2019

@wilsonge I already discussed this with some core developers. This is not related to Plesk, but a bug in Joomla!'s filesystem handler. This problem will not only occur on Plesk servers but also on other systems (see comment above with Direct Admin). I will provide a fix for it asap!

avatar Kubik-Rubik
Kubik-Rubik - comment - 4 Jul 2019
avatar wilsonge
wilsonge - comment - 4 Jul 2019

@Kubik-Rubik that makes some sense - i've dropped a comment there for some extra sanity checks however :)

avatar Kubik-Rubik
Kubik-Rubik - comment - 4 Jul 2019

@wilsonge Thanks, George. Already replied there! ;-)

avatar Kubik-Rubik
Kubik-Rubik - comment - 4 Jul 2019

The fix was merged. Thanks, George!

Issue can be closed. :-)

avatar wilsonge
wilsonge - comment - 4 Jul 2019

Merged over there. can you do a PR here to update composer. composer update joomla/session

avatar Kubik-Rubik
Kubik-Rubik - comment - 4 Jul 2019

Sure! Give me some minutes, need to update my fork... :-D

avatar alikon alikon - change - 4 Jul 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-07-04 19:30:55
Closed_By alikon
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jul 2019
Closed_By alikon joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 4 Jul 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 4 Jul 2019

Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/20821

avatar alikon
alikon - comment - 4 Jul 2019

Add a Comment

Login with GitHub to post a comment