GUI troubleshooting

From VoIPmonitor.org
Revision as of 05:43, 4 January 2026 by Admin (talk | contribs) (Add IonCube Loader troubleshooting section with SELinux, AppArmor, PrivateTmp, and temp directory permission fixes)


This page provides troubleshooting tips and debugging techniques for the VoIPmonitor web GUI.

GUI Debug Mode

The GUI debug mode allows you to see SQL queries and other debugging information directly in your browser's Developer Console.

Enabling Debug Mode

To enable debug mode in the VoIPmonitor web GUI, add the parameter ?debug=31415 to the end of any GUI URL. For example:

http://your-server/voipmon/admin.php?debug=31415

This enables the following features:

  • SQL queries executed by the GUI are logged to the browser's Developer Console
  • Additional debugging information is displayed for dashboard panels and charts
  • Performance timing and query execution details become visible

Finding SQL Queries for Dashboard Panels

To see the exact SQL query executed by a dashboard panel:

  1. Add ?debug=31415 to your GUI URL and navigate to the dashboard
  2. Open your browser's Developer Tools (press F12 or Ctrl+Shift+I)
  3. Switch to the Console tab
  4. Interact with the dashboard (e.g., refresh, change time range, or hover over panels)
  5. The SQL queries will be printed to the console log

The queries appear in the console in the order the panels are rendered. If you need to isolate a specific panel, hover over it or interact with its filters after loading the page - this often triggers a re-query which will appear as a new entry in the console.

Disabling Debug Mode

Simply remove the ?debug=31415 parameter from the URL, or navigate to any GUI page without it. Debug mode is not persistent and must be re-enabled each time by adding the URL parameter.

GUI Upgrade Issues

The following are common issues that may occur during GUI upgrades and their solutions.

VM Binary (binary missing) Error

If you encounter an error message indicating "VM Binary (binary missing)" during or after a GUI upgrade, this indicates that the GUI application files were not completely updated. Perform a forced CLI upgrade to resolve this issue:

# Log in to the GUI host as root
# Navigate to the GUI installation directory (default is /var/www/html)
cd /var/www/html

# Execute the forced upgrade command
php php/run.php upgrade -f

The -f flag forces a complete upgrade, which updates any missing or corrupt GUI binaries.

IonCube Loader Issues

The VoIPmonitor GUI is protected with IonCube, which requires proper PHP configuration. Common issues include permission errors on temporary directories and security module interference.

Unable to create lock file / temp directory not writable

If you see errors like "Unable to create lock file" or "System temp directory check fails... not writable" from IonCube Loader, follow these troubleshooting steps:

Step 1: Update the system and restart

First, ensure your system packages are up to date:

# Debian/Ubuntu
sudo apt update && sudo apt upgrade -y

# RHEL/CentOS/AlmaLinux
sudo yum update -y
# or
sudo dnf update -y

# Then restart the server
sudo reboot

Step 2: Check SELinux or AppArmor

Security modules like SELinux (default on RHEL/CentOS/Red Hat systems) or AppArmor (default on Ubuntu/Debian) can block IonCube from accessing temporary directories.

Check if SELinux is enabled:

# Check current status
getenforce

# Common values: Enforcing (active), Permissive (logging only), Disabled

# To temporarily disable SELinux for testing:
sudo setenforce 0

If disabling SELinux resolves the issue, you can permanently configure it:

# Edit the SELinux configuration file
sudo nano /etc/selinux/config

# Change SELINUX= to either:
# SELINUX=permissive
# or
# SELINUX=disabled

# Then reboot the server
sudo reboot

Check if AppArmor is enabled:

# Check AppArmor status
sudo aa-status

# If AppArmor is running, temporarily disable individual profiles:
sudo aa-disable /etc/apparmor.d/*php*

# Or disable it entirely for testing:
sudo systemctl stop apparmor
sudo systemctl disable apparmor

Step 3: Check systemd PrivateTmp

Some systemd service configurations use PrivateTmp=true, which creates a private temporary directory for each service. This can cause issues if the private tmp directory has restrictive permissions.

Check if your web server is using PrivateTmp:

# For Apache
systemctl show httpd | grep PrivateTmp
# or
systemctl show apache2 | grep PrivateTmp

# For PHP-FPM
systemctl show php-fpm | grep PrivateTmp

If PrivateTmp is enabled (value=1), disable it in the service file:

sudo nano /etc/systemd/system/httpd.service
# or
sudo nano /etc/systemd/system/apache2.service

# Find the line PrivateTmp=true and change it to:
# PrivateTmp=false

# Reload systemd and restart the service:
sudo systemctl daemon-reload
sudo systemctl restart httpd
# or
sudo systemctl restart apache2

Step 4: Verify PHP Temporary Directory Configuration

Check which temporary directory PHP is using:

Create a PHP info file:

echo '<?php phpinfo(); ?>' > /var/www/html/info.php

Visit http://your-server-ip/info.php in your browser and search for:

  • upload_tmp_dir
  • sys_get_temp_dir
  • session.save_path

Ensure these directories are writable by the web server user:

# Check ownership
ls -ld /tmp
# or custom temp directory
ls -ld /var/www/tmp

# Fix ownership if needed
sudo chown www-data:www-data /tmp  # Debian/Ubuntu
# or
sudo chown apache:apache /tmp      # CentOS/RHEL

# Fix permissions
sudo chmod 775 /tmp

Step 5: Check open_basedir restrictions

If the above steps don't resolve the issue, check if PHP's open_basedir is restricting access to the temp directory:

# Check open_basedir in php.ini
grep open_basedir /etc/php/*/apache2/php.ini
# or
grep open_basedir /etc/php.ini

Ensure the temp directory is included in the list, e.g.: open_basedir = /var/www/html:/tmp

Clean up after troubleshooting:

rm /var/www/html/info.php

Alternative: MySQL General Log

If you need a persistent server-side log of all database queries (not just from the GUI), you can enable the MySQL general log:

-- Enable general log
SET GLOBAL general_log = 'ON';

-- Perform actions in the GUI...

-- Disable when done (important for performance)
SET GLOBAL general_log = 'OFF';

The log file location is typically /var/lib/mysql/hostname.log or as defined in your MySQL configuration.

AI Summary for RAG

Summary: This page covers GUI troubleshooting techniques including debug mode, upgrade issues, and IonCube Loader problems with temp directory permissions, SELinux, AppArmor, and systemd PrivateTmp. Keywords: GUI troubleshooting, debug mode, IonCube, SELinux, AppArmor, PrivateTmp, temporary directory, permissions, open_basedir Key Questions:

  • How do I enable debug mode in the GUI?
  • How do I fix "Unable to create lock file" errors from IonCube Loader?
  • How do I check if SELinux or AppArmor is causing permission issues?
  • What is systemd PrivateTmp and how does it affect the GUI?
  • How do I diagnose PHP temporary directory configuration problems?