MySQL Manager - Internal Server Error

Internal Server Error

Description

When visiting MySQL Manager, I see “Internal Server Error”.

Steps to Reproduce

see above

Expected Behavior

Databases should be listed.

Actual Behavior

Internal server error

Environment

ApisCP version: cpcmd misc:cp-version

revision: 14298c61220e1dc8c5e924f794638f0d427c05c5
timestamp: 1752087950
ver_maj: 3
ver_min: 2
ver_patch: 0
ver_pre: 14298c612
dirty: false
debug: false

Operating System: uname -r

4.18.0-553.58.1.el8_10.x86_64

Additional relevant information (e.g., PHP version, database, etc.):

Additional Information

What’s in storage/logs/php-fpm.log + storage/logs/start.log? Which version of MariaDB is installed?

php-fpm.log
[09-Jul-2025 20:22:42] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[09-Jul-2025 20:24:13] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[09-Jul-2025 20:25:22] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[09-Jul-2025 20:25:50] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[09-Jul-2025 20:27:12] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[09-Jul-2025 20:39:43] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[09-Jul-2025 20:39:56] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[09-Jul-2025 22:31:00 UTC] Unable to connect to socket, is apnscp running?

No such file or directory

[09-Jul-2025 22:31:00] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[09-Jul-2025 23:08:51 UTC] PHP Warning: file_put_contents(/usr/local/apnscp/storage/logs/start.log): Failed to open stream: Permission denied in /usr/local/apnscp/lib/error_reporter.php on line 356

Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in /usr/local/apnscp/lib/ModuleCache.php on line 46"

[10-Jul-2025 00:07:16] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[10-Jul-2025 18:59:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:12:53 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:13:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:13:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:13:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:13:23 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:14:42 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:17:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:17:17 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:21:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:22:15 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:22:36 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:22:36 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected

[10-Jul-2025 19:37:39 UTC] `letsencrypt_request': crash or other nasty error detected

[10-Jul-2025 19:37:47 UTC] `letsencrypt_request': crash or other nasty error detected

[10-Jul-2025 20:35:16] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[10-Jul-2025 20:37:58] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.

[10-Jul-2025 21:22:07 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
start.log
[09-Jul-2025 20:22:42] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[09-Jul-2025 20:24:13] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[09-Jul-2025 20:25:22] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[09-Jul-2025 20:25:50] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[09-Jul-2025 20:27:12] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[09-Jul-2025 20:39:43] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[09-Jul-2025 20:39:56] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[09-Jul-2025 22:31:00 UTC] Unable to connect to socket, is apnscp running?
No such file or directory
[09-Jul-2025 22:31:00] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[09-Jul-2025 23:08:51 UTC] PHP Warning:  file_put_contents(/usr/local/apnscp/storage/logs/start.log): Failed to open stream: Permission denied in /usr/local/apnscp/lib/error_reporter.php on line 356
Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in /usr/local/apnscp/lib/ModuleCache.php on line 46"
[10-Jul-2025 00:07:16] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[10-Jul-2025 18:59:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:12:53 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:13:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:13:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:13:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:13:23 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:14:42 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:17:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:17:17 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:21:16 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:22:15 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:22:36 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:22:36 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
[10-Jul-2025 19:37:39 UTC] `letsencrypt_request': crash or other nasty error detected
[10-Jul-2025 19:37:47 UTC] `letsencrypt_request': crash or other nasty error detected
[10-Jul-2025 20:35:16] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[10-Jul-2025 20:37:58] WARNING: Nothing matches the include pattern '/usr/local/apnscp/config/php-fpm.d/*.conf' from /usr/local/apnscp/config/php-fpm.conf at line 139.
[10-Jul-2025 21:22:07 UTC] `mysql_schema_column_maxlen': crash or other nasty error detected
root->httpd$ tail -n 50 /usr/local/apnscp/storage/logs/start.log
            [/usr/local/apnscp/lib/mysql.php:218]
         5B. MySQL->__construct("localhost", "root", "x", "mysql", null, null)
            [/usr/local/apnscp/lib/mysql.php:218]
         6B. MySQL->__construct("localhost", "root", "x", "mysql", null, null)
            [/usr/local/apnscp/lib/mysql.php:218]
         7B. MySQL->__construct("localhost", "root", "x", "mysql", null, null)
            [/usr/local/apnscp/lib/mysql.php:218]
         8B. MySQL->__construct("localhost", "root", "x", "mysql", null, null)
            [/usr/local/apnscp/lib/mysql.php:218]
         9B. MySQL->__construct("localhost", "root", "x", "mysql", null, null)
            [/usr/local/apnscp/lib/mysql.php:218]
        10B. MySQL->__construct("localhost", "root", "x", "mysql", null, null)
            [/usr/local/apnscp/lib/mysql.php:218]
        11B. MySQL->__construct("localhost", "root", "x", "mysql", null, null)
            [/usr/local/apnscp/lib/mysql.php:218]
        12B. MySQL->__construct("localhost", "root", "x", "mysql", null, null)
            [/usr/local/apnscp/lib/mysql.php:116]
        13B. MySQL::initialize("localhost", "root", "x", "mysql")
            [/usr/local/apnscp/lib/Opcenter/Database/MySQL.php:235]
        14B. Opcenter\Database\MySQL::connectRoot()
            [/usr/local/apnscp/lib/Opcenter/Database/MySQL.php:570]
        15B. Opcenter\Database\MySQL::fieldLength("user")
            [/usr/local/apnscp/lib/modules/mysql.php:2439]
        16B. Mysql_Module->schema_column_maxlen("user")
            [/usr/local/apnscp/lib/Module/Skeleton/Standard.php:146]
        17B. Module\Skeleton\Standard->_invoke("schema_column_maxlen", ["user"])
            [/usr/local/apnscp/lib/apnscpfunction.php:991]
        18B. apnscpFunctionInterceptor->call("mysql_schema_column_maxlen", ["user"])
            [/usr/local/apnscp/lib/lservicelib8.pht:1183]
        19B. ListenerService\Daemon->process_backend_data("OO:12:"apnscpObject":8:{s:7:"command";s:26:"mysql_schema_column_maxlen";s:4:"args";a:1:{i:0;s:4:"user";}s:5:"error";N;s:10:"session_id";s:32:"OIzsgVIVht4Boaa3HNNhKEEIMT1IK6Ll";s:13:"returned_data";N;s:7:"options";N;s:12:"error_buffer";N;s:16:"apnscpObjectip";s:14:"57.138.142.130";}")
            [/usr/local/apnscp/lib/lservicelib8.pht:1100]
        20B. ListenerService\Daemon->client_processing_loop()
            [/usr/local/apnscp/lib/lservicelib8.pht:1056]
        21B. ListenerService\Daemon->spawn()
            [/usr/local/apnscp/lib/lservicelib8.pht:867]
        22B. ListenerService\Daemon->findWorker(282362)
            [/usr/local/apnscp/lib/lservicelib8.pht:1409]
        23B. ListenerService\Daemon->dispatch(Socket)
            [/usr/local/apnscp/lib/lservicelib8.pht:1281]
        24B. ListenerService\Daemon->master()
            [/usr/local/apnscp/lib/lservicelib8.pht:1229]
        25B. ListenerService\Daemon->create_master_socket_server()
            [/usr/local/apnscp/lib/lservicelib8.pht:292]
        26B. ListenerService\Daemon->start()
            [/usr/local/apnscp/lib/lservicelib8.pht:170]
        27B. ListenerService\Daemon->__construct()
            [/usr/local/apnscp/lib/lservicelib8.pht:1462]
        28B. ListenerService\Daemon::init()
            [/usr/local/apnscp/lib/lservice.php:28]
Unable to connect to database[Thu Jul 10 21:22:09 2025] [last message repeated 109 times]

mariadb from 11.4.7-MariaDB, client 15.2 for Linux (x86_64) using EditLine wrapper

Thanks - I appreciate your time looking into this!

Looks like the password in /root/.my.cnf isn’t correct with what MariaDB has.

Does the command mysql fail as root? If so, run upcp -sbf apnscp/initialize-db, then retry.

I updated the password, but it still failed. Then I checked start.log and saw it mentioned the file had an unexpected character. The root password has a special character in it, and the /root/.my.cnf file didn’t use quotes around the password. I added quotes and now it’s working.

Thanks for your help!

Thanks for the bug report. Fixed in edge :+1:

I was able to reproduce this by using “()” in the password; certain characters like $ and # didn’t trigger the expected behavior.