Testingpage: Difference between revisions
No edit summary |
No edit summary |
||
| Line 25: | Line 25: | ||
# Check for mysqlnd extension | # Check for mysqlnd extension | ||
php -m | grep mysqlnd | php -m | grep mysqlnd | ||
</ | </syntaxhighlight> | ||
{{Note|The <code>mysql_connect</code> function was deprecated in PHP 5.5 and removed in PHP 7.0. Modern VoIPmonitor GUI versions use <code>mysqli</code> for database connections. If you see <code>mysql_connect</code> errors, upgrade your GUI to a version compatible with your PHP version. See [[Re-install_the_GUI|Re-install the GUI]].}} | {{Note|The <code>mysql_connect</code> function was deprecated in PHP 5.5 and removed in PHP 7.0. Modern VoIPmonitor GUI versions use <code>mysqli</code> for database connections. If you see <code>mysql_connect</code> errors, upgrade your GUI to a version compatible with your PHP version. See [[Re-install_the_GUI|Re-install the GUI]].}} | ||
Revision as of 02:17, 12 January 2026
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.