• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Resolved Problems with Magento 2

bulent

Regular Pleskian
On my VPS I have two Magento 2 test installs.
Both installs begin to return the error below:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXXXXXXXX


As I said these are some test installs and I removed this instalations and now when I try to install it again I get this error at the end of instalation:

Error: The following error has occurred during the installation of application: Installation of magento at http://m2.example.com/ failed. Non-zero exit status returned by script. Output stream: 'PHP Fatal error: Uncaught ErrorException: SessionHandler::read(): open(/var/lib/php/session/sess_8nhj4i6r07i6c7ot0384b4m9u4, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php:74 Stack trace: #0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'SessionHandler:...', '/var/www/vhosts...', 74, Array) #1 /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php(74): SessionHandler->read('8nhj4i6r07i6c7o...') #2 [internal function]: Magento\Framework\Session\SaveHandler->read('8nhj4i6r07i6c7o...') #3 /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SessionManager.php(189): session_start() #4 /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SessionManager.php(130): Magento\Framework\Session\SessionManager->start() #5 /var/www/vhosts/example.com/m2.example.com/vendor/magento/module-backend/Model/Auth/Session.php(88): Magento\Framework\Session\Se in /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php on line 74 PHP Fatal error: Uncaught ErrorException: SessionHandler::write(): open(/var/lib/php/session/sess_8nhj4i6r07i6c7ot0384b4m9u4, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php:86 Stack trace: #0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'SessionHandler:...', '/var/www/vhosts...', 86, Array) #1 /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php(86): SessionHandler->write('8nhj4i6r07i6c7o...', '') #2 [internal function]: Magento\Framework\Session\SaveHandler->write('8nhj4i6r07i6c7o...', '') #3 {main} thrown in /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php on line 86 '. Error stream: 'PHP Fatal error: Uncaught ErrorException: SessionHandler::read(): open(/var/lib/php/session/sess_8nhj4i6r07i6c7ot0384b4m9u4, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php:74 Stack trace: #0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'SessionHandler:...', '/var/www/vhosts...', 74, Array) #1 /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php(74): SessionHandler->read('8nhj4i6r07i6c7o...') #2 [internal function]: Magento\Framework\Session\SaveHandler->read('8nhj4i6r07i6c7o...') #3 /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SessionManager.php(189): session_start() #4 /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SessionManager.php(130): Magento\Framework\Session\SessionManager->start() #5 /var/www/vhosts/example.com/m2.example.com/vendor/magento/module-backend/Model/Auth/Session.php(88): Magento\Framework\Session\Se in /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php on line 74 PHP Fatal error: Uncaught ErrorException: SessionHandler::write(): open(/var/lib/php/session/sess_8nhj4i6r07i6c7ot0384b4m9u4, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php:86 Stack trace: #0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'SessionHandler:...', '/var/www/vhosts...', 86, Array) #1 /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php(86): SessionHandler->write('8nhj4i6r07i6c7o...', '') #2 [internal function]: Magento\Framework\Session\SaveHandler->write('8nhj4i6r07i6c7o...', '') #3 {main} thrown in /var/www/vhosts/example.com/m2.example.com/vendor/magento/framework/Session/SaveHandler.php on line 86 '.

What could be the problem?
 
Hi bulent,

your read/write permissions are somehow misconfigured. Pls. be are that CGI/FastCGI and PHP-FPM is configured to process files and scripts by the domain-specific system-user and the group "psacln".

Code:
chown -R DOMAIN-SPECIFIC-SYSTEM-USER:psacln /var/www/vhosts/example.com/m2.example.com/*

Pls. make sure, that "/var/lib/php/session" has as well the correct permissions :

Code:
chmod 1733 /var/lib/php/session
root:root /var/lib/php/session
 
Thanks mate ;) that helped.

But what could cause that issue, my plesk install was without any modification.
 
Hi bulent,

some "bad coded" applications/software still either use "apache : apache" or "www-data : www-data" as rights for newly created files/folders in your documentroot, which might work, when you only use apache as your webserver, but not with CGI/FastCGI and/or PHP-FPM - usage, configured as we do it with Plesk.

On the other hand, the issue with the false rights and permissions for "/var/lib/php/session" was a bug in earlier PHP - versions ( as well with Plesk-built PHP - packages ), where some packages as well used a different session - location, instead of the standart.
 
Hi bulent,

sorry, I can't confirm this, because I didn't experience issues as described at the other thread ( using Ubuntu 14.04, Ubuntu 16.06 and Debian 7 and 8 ).
 
Back
Top