Testingpage

From VoIPmonitor.org
Revision as of 02:16, 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.

<syntaxhighlight lang="bash">

  1. 1. Locate the database configuration file

cat /var/www/html/config/configuration.php

  1. Note the values for:
  2. MYSQL_HOST
  3. MYSQL_DB
  4. MYSQL_USER
  5. MYSQL_PASS
  1. 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">

  1. Check for mysqli extension

php -m | grep mysqli

  1. Check for mysqlnd extension

php -m | grep mysqlnd </syntax>

ℹ️ 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.