Testingpage

From VoIPmonitor.org
Revision as of 02:17, 12 January 2026 by Festr (talk | contribs)

Testing Database Connection

If the GUI displays database connectivity errors, verify the connection from the command line using the credentials from the GUI configuration file.

# 1. Locate the database configuration file
cat /var/www/html/config/configuration.php

# Note the values for:
# MYSQL_HOST
# MYSQL_DB
# MYSQL_USER
# MYSQL_PASS

# 2. Test the database connection from command line
mysql -h [MYSQL_HOST] -u [MYSQL_USER] [MYSQL_DB] -p[MYSQL_PASS]
</syntax>

If the command line connection succeeds, verify that the PHP environment has the necessary extensions enabled for database connections:

<syntaxhighlight lang="bash">
# Check for mysqli extension
php -m | grep mysqli

# Check for mysqlnd extension
php -m | grep mysqlnd

ℹ️ Note: The mysql_connect function was deprecated in PHP 5.5 and removed in PHP 7.0. Modern VoIPmonitor GUI versions use mysqli for database connections. If you see mysql_connect errors, upgrade your GUI to a version compatible with your PHP version. See Re-install the GUI.