• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Roundcube http 500 error

M. Tolgahan ALAN

New Pleskian
* Upgrade Plesk Obsidian
- webmail.xxxxxx.net http 500 errors

PHP Fatal error: Uncaught Error: Class 'PDO' not found in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db_mysql.php:144
 
Follow the steps from the KB article:

Log in to Plesk server via SSH
Comment out extension_dir directive in the /etc/psa-webmail/roundcube/php.ini and /etc/php.ini files, e.g.:

Code:
grep extension /etc/psa-webmail/roundcube/php.ini
;extension_dir = "./"

So, the value for extension_dir directive should look as follows:

Code:
php -i | grep extension_dir
extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules

Log into Plesk.
Turn on the pdo, pdo_mysql and pdo_sqlite extensions under Home > Tools & Settings > PHP Settings > %php_version% by OS vendor FastCGI application

Make sure that modules were activated using the following command:

Code:
php -m | grep -i pdo PDO pdo_mysql pdo_sqlite
 
# php -i | grep extension_dir
# extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules
sqlite3.extension_dir => no value => no value


# php -m | grep -i pdo PDO pdo_mysql pdo_sqlite
# grep: PDO: No such file or directory
grep: pdo_mysql: No such file or directory
grep: pdo_sqlite: No such file or directory
 
Syntax in the KB is wrong, try this:

Code:
# php -m | grep -i pdo

Output should be:
PDO
pdo_dblib
pdo_mysql
pdo_sqlite
 
So, did you comment out the "extension_dir" in /etc/psa-webmail/roundcube/php.ini as described in the KB article?

When you enter this command:
Code:
grep extension /etc/psa-webmail/roundcube/php.ini
You should get the output:
;extension_dir = "./"

Note the ; at the beginning! If it's not commented out then you'll have to edit that file and put a ; at the beginning of that line
 
So there you have your problem. Please do what's written in the KB and what I've posted here. You need to comment this line out in
/etc/psa-webmail/roundcube/php.ini
 
So there you have your problem. Please do what's written in the KB and what I've posted here. You need to comment this line out in
/etc/psa-webmail/roundcube/php.ini
my English is bad. asking to confirm;
/etc/psa-webmail/roundcube/php.ini
extension_dir = "/usr/lib64/php/modules"

change

#extension_dir = "/usr/lib64/php/modules

?
 
So, restart your server and check if it works.
Code:
[03-Jan-2020 12:17:40 UTC] PHP Warning:  session_start(): Failed to read session data: user (path: /tmp) in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_session.php on line 129
[03-Jan-2020 12:17:40 UTC] PHP Fatal error:  Uncaught Error: Class 'PDO' not found in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db_mysql.php:144
 
Well, if you really followed all the steps that are mentioned in Unable to open Roundcube Webmail with error 500: Class 'PDO' not found then I would suggest you re-install Roundcube via the Plesk installer.
/add_components.html & remove and install roundcube. and try "plesk repair --installation -y" .


Code:
[03-Jan-2020 13:32:08 UTC] PHP Warning:  session_start(): Failed to read session data: user (path: /tmp) in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_$
[03-Jan-2020 13:32:08 UTC] PHP Fatal error:  Uncaught Error: Class 'PDO' not found in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db_mysql.php:144
Stack trace:
#0 /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php(152): rcube_db_mysql->dsn_options(Array)
#1 /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php(137): rcube_db->conn_create(Array)
#2 /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php(230): rcube_db->dsn_connect(Array, 'w')
#3 /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php(416): rcube_db->db_connect('w', true)
#4 /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php(379): rcube_db->_query('SELECT `vars`, ...', 0, 0, Array)
#5 /usr/share/psa-roundcube/program/lib/Roundcube/rcube_session_db.php(99): rcube_db->query('SELECT `vars`, ...', '43699ed99a30767...')
#6 [internal function]: rcube_session_db->read('43699ed99a30767...')
#7 /usr/share/psa-roundcube/program/lib/Roundcube/rcube_session.php(129): session_start()
#8 /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php(532): rcube_sessio in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db_mysql.php on line 144
 
psa-horde.log

Code:
2020-01-03T13:40:39+00:00 EMERG: HORDE Error: Call to undefined function mysql_connect() in /usr/share/psa-pear/pear/php/Horde/Db/Adapter/Mysql.php:82
Stack trace:
#0 /usr/share/psa-pear/pear/php/Horde/Db/Adapter/Base.php(157): Horde_Db_Adapter_Mysql->connect()
#1 /usr/share/psa-pear/pear/php/Horde/Core/Factory/Db.php(189): Horde_Db_Adapter_Base->__construct(Array)
#2 /usr/share/psa-pear/pear/php/Horde/Core/Factory/Db.php(106): Horde_Core_Factory_Db->_createDb(Array, '83e0dc9a098b543...')
#3 /usr/share/psa-pear/pear/php/Horde/Core/Factory/Perms.php(34): Horde_Core_Factory_Db->create('horde', 'perms')
#4 /usr/share/psa-pear/pear/php/Horde/Injector/Binder/Factory.php(119): Horde_Core_Factory_Perms->create(Object(Horde_Injector))
#5 /usr/share/psa-pear/pear/php/Horde/Injector.php(238): Horde_Injector_Binder_Factory->create(Object(Horde_Injector))
#6 /usr/share/psa-pear/pear/php/Horde/Injector.php(272): Horde_Injector->createInstance('Horde_Perms')
#7 /usr/share/psa-pear/pear/php/Horde/Registry.php(1748): Horde_Injector->getInstance('Horde_Perms')
#8 /usr/share/psa-pear/pear/php/Horde/Registry.php(890): Horde_Registry->hasPermission('horde', 4)
#9 /usr/share/psa-pear/pear/php/Horde/Core/Notification/Handler.php(69): Horde_Registry->listApps(Array, false, 4)
#10 /usr/share/psa-pear/pear/php/Horde/Registry.php(575): Horde_Core_Notification_Handler->attachAllAppHandlers()
#11 /usr/share/psa-pear/pear/php/Horde/Registry.php(287): Horde_Registry->__construct(0, Array)
#12 /usr/share/psa-horde/index.php(18): Horde_Registry::appInit('horde', Array)
#13 {main} [pid 2347 on line 74 of "/usr/share/psa-pear/pear/php/Horde/ErrorHandler.php"]
 
Back
Top