The Application Vault page or any application cannot be opened in Plesk: Can’t open lib ‘/usr/lib/libmyodbc5.so’
Symptoms
When accessing Application Vault or any application, e.g WordPress, the following error appears in Plesk (the path to the file may vary):
Internal error: ODBC error #01000: [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : file not found Message ODBC error #01000: [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : file not found File aps_php.php Line 12157 Type Exception
The following error message appears in the logfile /var/log/plesk/panel.log:
ERR [1] ODBC error #01000: [unixODBC][Driver Manager]Can't open lib '/usr/lib/libmyodbc5.so' : file not found ERR [panel] Exception: ODBC error #01000: [unixODBC][Driver Manager]Can't open lib '/usr/lib/libmyodbc5.so' : file not found file: /usr/share/aps_php/aps_php.php
In case Power User view is used, https://203.0.113.2:8443/smb/ is showing the “502 Bad Gateway” error.
Backups are created with a warning:
Warning: domain “example.com”
Unable to get APS instances on webspace id 1 (ErrorCode: 1, STDOUT:).
Additionally, following error can be found in /usr/local/psa/PMM/sessions//stderr
ODBC error #01000: [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : file not found
[2018-09-08 04:54:50.302] ERR [panel] Unable to get apsc.aps_registry_package row from psa.smb_apsPackage with ID = 58. Details: Exception: ODBC error #01000: [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : file not found in /usr/share/aps_php/aps_php.php:12519
Stack trace:
#0 /usr/share/aps_php/aps_php.php(12519): aps_controller_registry_getpackage(Resource id #182, 'daac84ae-71f1-4...')
#1 /usr/local/psa/admin/plib/Smb/Db/Table/Row/ApsPackage.php(65): APS_Controller_Registry->getPackage('daac84ae-71f1-4...')
#2 /usr/local/psa/admin/plib/api-common/cuAps.php(1501): Smb_Db_Table_Row_ApsPackage->getRegistryPackage()
#3 /usr/local/psa/admin/plib/api-common/cuAps.php(552): cuAps->_getPackagesGlobalSettings()
#4 /usr/local/psa/admin/plib/api-common/CuExecutor.php(59): cuAps->__construct(NULL)
#5 /usr/local/psa/admin/plib/api-common/CuExecutor.php(130): CuExecutor->execUtil('cuAps', NULL)
#6 /usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php(25): CuExecutor->run()
#7 /usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php(36): CliUtilityRunner->run()
#8 /usr/local/psa/admin/plib/api-cli/aps.php(4): require_once('/usr/local/psa/...')
#9 {main}
Cause
The path to the MySQL ODBC driver is incorrect.
Resolution
Connect to a Plesk server via SSH.
Find a proper path to the MySQL driver:
# ls /usr/lib*/libmyodbc*w.so /usr/lib64/libmyodbc5w.so
Note: If the command above does not return libmyodbc file, refer to this KB article for installation instructions. The path may also differ based on the MySQL ODBC Connector version installed.
Open the file /etc/odbcinst.ini in a text editor (for example, “vi” editor) and replace an old path under the [MySQL] section with a correct path from step 2:
[MySQL] Description = MySQL driver for Plesk Driver = /usr/lib64/libmyodbc5w.so Setup = FileUsage = 1 Driver64 = /usr/lib64/libmyodbc5w.so Setup64 = UsageCount = 1
Create a symbolic link to the mysql.sock file:
# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
