|
|
| (5 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| {{DISPLAYTITLE:How to Reinstall the Web GUI}} | | {{DISPLAYTITLE:How to Reinstall the Web GUI}} |
|
| |
|
| '''This guide provides a step-by-step process for safely reinstalling the VoIPmonitor web GUI. This procedure is the recommended solution for fixing a corrupted installation or adapting the GUI to a new PHP version after a system upgrade.''' | | '''This guide provides a step-by-step process for safely reinstalling the VoIPmonitor web GUI without losing your data or configuration.''' |
|
| |
|
| == When to Reinstall the GUI == | | == When to Reinstall == |
| A reinstallation overwrites the core GUI application files without affecting your data (CDRs and PCAPs) or your primary configuration (`config/configuration.php`). It is the correct solution for scenarios such as:
| |
| * A failed or incomplete GUI upgrade due to a power loss, full disk, or other interruption.
| |
| * The GUI fails to load after a server operating system or PHP version upgrade.
| |
| * Suspected file corruption in the GUI's web directory.
| |
| * The Apache default welcome page or a generic index.html page is displayed instead of the VoIPmonitor GUI after an update or upgrade.
| |
|
| |
|
| '''Note:''' This guide assumes you have a previously working GUI and that all necessary PHP dependencies (like <code>ionCube Loader</code>) are already installed.
| | A reinstallation overwrites GUI application files while preserving your data (CDRs, PCAPs) and configuration (<code>config/configuration.php</code>). Use this procedure when: |
| | * A GUI upgrade failed due to power loss, full disk, or other interruption |
| | * The GUI fails to load after a PHP version upgrade |
| | * Apache shows the default welcome page instead of VoIPmonitor |
| | * Suspected file corruption in the web directory |
|
| |
|
| == Reinstallation Process Overview ==
| | {{Note|This guide assumes you have a previously working GUI with all PHP dependencies (ionCube Loader) already installed.}} |
|
| |
|
| <kroki lang="mermaid"> | | <kroki lang="mermaid"> |
| Line 32: |
Line 31: |
| </kroki> | | </kroki> |
|
| |
|
| == Step 1: Identify Your Server's PHP Version == | | == Installation Steps == |
| The GUI package is specific to the major PHP version installed on your server. First, determine which version you are running. | | |
| | === Step 1: Identify PHP Version === |
| | |
| | The GUI package must match your PHP major version: |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| php --version | | php --version |
| </syntaxhighlight> | | </syntaxhighlight> |
| Look for the first two numbers (e.g., <code>8.1</code>, <code>8.2</code>, <code>7.4</code>). You will use this to download the correct package.
| | Note the first two numbers (e.g., <code>8.1</code>, <code>8.2</code>, <code>7.4</code>). |
| | |
| | {{Warning|1=CLI PHP version may differ from web server PHP version. Create <code>phpinfo();</code> test file to verify web server version if in doubt.}} |
| | |
| | === Step 2: Backup Current GUI === |
|
| |
|
| == Step 2: Back Up Your Current GUI Directory ==
| |
| Before making any changes, it is crucial to create a backup of your entire web directory. This allows you to revert easily if anything goes wrong.
| |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| # The default path is /var/www/html, but adjust if you have a custom path
| |
| sudo cp -a /var/www/html /var/www/html-backup-$(date +%F) | | sudo cp -a /var/www/html /var/www/html-backup-$(date +%F) |
| </syntaxhighlight> | | </syntaxhighlight> |
|
| |
|
| {{Warning|1=The installation script attempts to preserve <code>configuration.php</code> and <code>key.php</code>. However, if these files become empty or corrupted during the reinstallation process, the GUI may fail to load with errors about empty paths in <code>fce_config.php</code> or similar configuration files. Always keep a separate backup of your configuration.}} | | {{Warning|1=Always keep a separate backup of <code>configuration.php</code> and <code>key.php</code>. If these become empty during installation, the GUI will fail with "empty path" errors.}} |
|
| |
|
| == Step 3: Download and Run the Installer == | | === Step 3: Download and Install === |
| This process involves downloading the latest GUI package and running its installation script.
| |
|
| |
|
| {{Note|For servers without internet access, see [[#Offline_Upgrade|Offline Upgrade]] below to download the files on another machine and transfer them via USB/SCP.}}
| |
|
| |
| ;1. Create a temporary directory and download the GUI package:
| |
| The following command downloads the latest GUI package compatible with your PHP version. Replace <code>81</code> with your version number (e.g., <code>82</code> for PHP 8.2, <code>74</code> for PHP 7.4).
| |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| mkdir /tmp/voipmonitor-gui-install | | mkdir /tmp/voipmonitor-gui-install |
| cd /tmp/voipmonitor-gui-install | | cd /tmp/voipmonitor-gui-install |
|
| |
|
| # Example for PHP 8.1 (change phpver=81 accordingly) | | # Replace phpver=81 with your version (82, 81, 74, etc.) |
| wget "https://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81" -O gui.tar.gz | | wget "https://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81" -O gui.tar.gz |
| </syntaxhighlight>
| |
|
| |
|
| ;2. (Optional) Validate the package contents before installation:
| | # Extract and install |
| If you need to verify that the downloaded GUI package contains the required binaries before installation (for example, in automated deployment scenarios or when you do not have a license available), you can check the package contents without extracting it:
| |
| <syntaxhighlight lang="bash">
| |
| # List the package contents and search for the required architecture binaries | |
| tar -tvf gui.tar.gz | grep "vm-"
| |
| </syntaxhighlight>
| |
| The expected output should include:
| |
| * <code>voipmonitor-gui-*/bin/vm-i686</code> (32-bit architecture binary)
| |
| * <code>voipmonitor-gui-*/bin/vm-x86_64</code> (64-bit architecture binary)
| |
| | |
| These binaries are essential for the VoIPmonitor GUI operation. If the search returns no results, the package may be incomplete or corrupted.
| |
| | |
| ;3. Extract the archive and run the installer:
| |
| <syntaxhighlight lang="bash">
| |
| tar xzf gui.tar.gz | | tar xzf gui.tar.gz |
| cd voipmonitor-gui-*/scripts/ | | cd voipmonitor-gui-*/scripts/ |
| sudo bash install-gui.sh ../../gui.tar.gz | | sudo bash install-gui.sh ../../gui.tar.gz |
| </syntaxhighlight> | | </syntaxhighlight> |
| The script will ask you to confirm the installation path. Press '''Enter''' to confirm the default path (e.g., <code>/var/www/html</code>). The script will then unpack the new GUI files over your existing installation.
| |
|
| |
|
| {{Note|The <code>install-gui.sh</code> script automatically preserves your <code>config/configuration.php</code> file and sets appropriate file permissions.}}
| | Press '''Enter''' to confirm the default installation path. The script preserves your <code>configuration.php</code> and sets permissions automatically. |
|
| |
|
| ;4. '''Alternative: Manual unpacking (if you prefer full control)'''
| | {{Tip|1=Validate package before install: <code>tar -tvf gui.tar.gz {{!}} grep "vm-"</code> should show <code>vm-i686</code> and <code>vm-x86_64</code> binaries.}} |
| If you need more control over the installation process or if the automated script encounters issues, you can manually empty the directory and unpack the files:
| |
|
| |
|
| | '''Alternative: Manual Installation''' |
| | |
| | If the automated script fails: |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| # Empty the web directory (be very careful with this command!) | | # Empty web directory (careful!) |
| sudo rm -rf /var/www/html/* | | sudo rm -rf /var/www/html/* |
|
| |
|
| # Unpack the GUI package | | # Unpack and set ownership |
| cd /tmp/voipmonitor-gui-install | | cd /tmp/voipmonitor-gui-install |
| tar xzf gui.tar.gz | | tar xzf gui.tar.gz |
| cp -r voipmonitor-gui-*/. /var/www/html/ | | cp -r voipmonitor-gui-*/. /var/www/html/ |
| | sudo chown -R www-data /var/www/html # Use "apache" on RHEL/CentOS |
|
| |
|
| # Set correct ownership for web server files | | # Restore configuration from backup |
| # Use "www-data" for Debian/Ubuntu, or "apache" for RHEL/CentOS/AlmaLinux
| | sudo cp /var/www/html-backup-$(date +%F)/config/configuration.php /var/www/html/config/ |
| sudo chown -R www-data /var/www/html
| | </syntaxhighlight> |
|
| |
|
| # Restore your configuration file from backup
| | {{Warning|1=Watch for '''"No space left on device"''' errors during tar extraction. Check disk space: <code>df -h</code>}} |
| sudo cp /var/www/html-backup-$(date +%F)/config/configuration.php /var/www/html/config/configuration.php
| |
| sudo chown www-data /var/www/html/config/configuration.php
| |
| </syntaxhighlight> | |
|
| |
|
| '''Important: Watch for tar extraction errors.''' Pay close attention to the output of the <code>tar</code> command during extraction. If you see errors such as '''"No space left on device"''', this indicates your disk is full and the installation will be incomplete. In this case, you must free up disk space before attempting installation again. To check available disk space:
| | === Step 4: Finalize in Browser === |
| <syntaxhighlight lang="bash">
| |
| df -h
| |
| </syntaxhighlight>
| |
|
| |
|
| == Step 4: Finalize the Installation in Your Browser ==
| | # Open the VoIPmonitor GUI in your browser |
| After the script finishes, you must complete the process in your web browser.
| | # Perform a hard refresh: '''Ctrl+Shift+R''' (or '''Cmd+Shift+R''' on Mac) |
|
| |
|
| ;1. Open the VoIPmonitor GUI in your browser.
| | This ensures the browser loads new assets and performs database schema checks. |
| ;2. Perform a hard refresh to bypass your browser's cache. In most browsers, the shortcut is '''Ctrl+Shift+R''' (or '''Cmd+Shift+R''' on Mac).
| |
|
| |
|
| This final step ensures that your browser loads the latest assets and that any necessary database schema checks are performed. Your GUI should now be fully restored and operational.
| | == Offline Installation == |
|
| |
|
| == Offline Upgrade (Servers Without Internet Access) ==
| | For servers without internet access: |
|
| |
|
| If your server does not have internet access or if standard web interface upgrades fail with "Unable to connect to upgrade server!" errors, you can perform an offline upgrade by downloading the files on another machine with internet access and transferring them to the target server.
| | # '''On a machine with internet:''' Download GUI package using wget command from Step 3 |
| | # '''Transfer:''' Copy <code>gui.tar.gz</code> to the offline server via SCP or USB |
| | # '''On offline server:''' Follow Steps 2-4 above |
|
| |
|
| === GUI Offline Upgrade === | | == Database Schema Updates == |
|
| |
|
| Follow these steps to upgrade the GUI without internet access:
| | After major version upgrades, database schema may need updates. |
|
| |
|
| ;1. On a machine WITH internet access, determine the PHP version:
| | '''Automatic (minor changes):''' |
| Check the PHP version on your offline server: <code>php --version</code>
| | * Navigate to <code>http://your-gui.com/?check_tables=1</code> |
| | * Or: '''Tools → System Status → Check MySQL Schema''' |
|
| |
|
| ;2. On the machine WITH internet access, download the GUI package:
| | '''Manual (major changes):''' |
| Use the same URL as shown in [[#Step 3: Download and Run the Installer|Step 3]], replacing <code>81</code> with your PHP version:
| |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| # Example for PHP 8.1 (adjust phpver= as needed) | | # Check logs for ALTER recommendations |
| wget "https://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81" -O gui.tar.gz
| | sudo journalctl -u voipmonitor -n 50 | grep -i "alter" |
| | |
| | # Execute in MySQL (run during off-peak hours - ALTERs lock tables) |
| | mysql -u root -p |
| | # Paste ALTER commands from logs |
| </syntaxhighlight> | | </syntaxhighlight> |
|
| |
|
| ;3. Transfer the file to your offline server:
| | For high-traffic environments, consider the '''migration instance method''' to avoid downtime. See [[Redundant_database]] for details. |
| Use SCP or a USB flash drive to transfer <code>gui.tar.gz</code> to the offline server's <code>/tmp</code> directory.
| |
|
| |
|
| ;4. On the offline server, complete Steps 2-4 from the main installation:
| | == Troubleshooting == |
| Back up your current GUI directory (Step 2), extract and install the package (Step 3), and perform the browser refresh (Step 4).
| |
| | |
| {{Note|For detailed backup, extraction, and configuration restoration steps, see [[#Step 2: Back Up Your Current GUI Directory|Step 2]] and [[#Step 3: Download and Run the Installer|Step 3]].}}
| |
| | |
| === GUI Fails with ionCube Loader Error After Upgrade === | |
|
| |
|
| If the VoIPmonitor GUI fails to load and displays an ionCube Loader error (including errors like "undefined symbol: zend_string_initerned") after upgrading your operating system or PHP version, this indicates that the ionCube Loader installed on your system is incompatible with your PHP version.
| | === ionCube Loader Error === |
|
| |
|
| '''Do NOT downgrade PHP.''' VoIPmonitor provides GUI packages for all major PHP versions including PHP 8.2, PHP 8.1, PHP 8.0, and PHP 7.4.
| | If GUI displays ionCube error (including "undefined symbol: zend_string_initerned") after PHP upgrade: |
|
| |
|
| '''Important: Check both CLI and web server PHP versions.''' The command-line PHP version may differ from the web server's PHP version. You must ensure the ionCube Loader matches the PHP version used by the web server.
| | {{Warning|1=Do NOT downgrade PHP. VoIPmonitor provides GUI packages for PHP 7.4, 8.0, 8.1, and 8.2.}} |
| | |
| ;1. Check the CLI PHP version:
| |
| <syntaxhighlight lang="bash">
| |
| php --version
| |
| </syntaxhighlight>
| |
| Look for the first two numbers (e.g., ''8.2'', ''8.1'', ''7.4'').
| |
|
| |
|
| ;2. Check the web server's PHP version:
| | '''Solution:''' Re-download GUI for your web server's PHP version: |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| # Create a test file in your web root directory | | # First verify web server PHP version (may differ from CLI) |
| echo '<?php phpinfo(); ?>' > /var/www/html/test.php | | echo '<?php phpinfo(); ?>' > /var/www/html/test.php |
| | # Check http://your-server/test.php, then remove test file |
|
| |
|
| # Access this file in your browser: http://your-server.com/test.php | | # Re-download correct version |
| # Look for the PHP version at the top of the page
| |
| </syntaxhighlight>
| |
| Compare the CLI and web server PHP versions. If they differ, the GUI (and ionCube Loader) on your web server must match the web server's PHP version, not the CLI version.
| |
| | |
| After checking, remove the test file:
| |
| <syntaxhighlight lang="bash">
| |
| rm /var/www/html/test.php
| |
| </syntaxhighlight>
| |
| | |
| ;3. '''Primary solution: Re-download the GUI package for your web server PHP version.''' The VoIPmonitor GUI includes pre-configured ionCube loaders for all major PHP versions. This is usually the easiest solution.
| |
| <syntaxhighlight lang="bash">
| |
| mkdir /tmp/voipmonitor-gui-install
| |
| cd /tmp/voipmonitor-gui-install
| |
| | |
| # For PHP 8.2 on web server (example - change as needed)
| |
| wget "https://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=82" -O gui.tar.gz | | wget "https://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=82" -O gui.tar.gz |
| | | # Follow Step 3 installation |
| # Or for PHP 8.1 on web server: | |
| # wget "https://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81" -O gui.tar.gz
| |
| </syntaxhighlight> | | </syntaxhighlight> |
|
| |
|
| ;4. Follow the installation steps in [[#Step 3: Download and Run the Installer]] above to complete the reinstallation.
| | '''Alternative:''' Download ionCube directly from [https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz ioncube.com] and configure manually. |
|
| |
|
| This process replaces only the GUI application files while preserving your configuration and CDR data.
| | === 500 Server Error (ionCube Config) === |
|
| |
|
| ;5. '''Alternative solution: Download ionCube Loader directly''' (only if GUI reinstallation does not resolve the issue):
| | After system update, 500 errors may indicate ionCube configs pointing to wrong PHP version: |
| <syntaxhighlight lang="bash">
| |
| # Download from the official ionCube website
| |
| cd /tmp
| |
| wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
| |
|
| |
|
| # Extract the archive
| |
| tar xzf ioncube_loaders_lin_x86-64.tar.gz
| |
|
| |
| # Copy the correct loader for your web server PHP version
| |
| # Example for PHP 8.2:
| |
| sudo cp ioncube/ioncube_loader_lin_8.2.so /usr/lib64/php/modules/
| |
|
| |
| # Edit the PHP configuration to load it
| |
| sudo nano /etc/php.d/ioncube.ini
| |
| # Add this line:
| |
| zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_8.2.so
| |
|
| |
| # Restart the web server
| |
| sudo systemctl restart httpd
| |
| # or
| |
| sudo systemctl restart apache2
| |
| # or
| |
| sudo systemctl restart php-fpm
| |
| </syntaxhighlight>
| |
|
| |
| === 500 Server Error After System Update (ionCube Configuration) ===
| |
|
| |
| If the VoIPmonitor GUI returns a '''500 server error''' and becomes completely inaccessible after a system update (particularly operating system or PHP version upgrades), this may indicate that ionCube configuration files on your system are pointing to the wrong PHP version. Unlike the basic ionCube error message (which is resolved by re-downloading the GUI), this issue requires fixing system-level PHP configuration files.
| |
|
| |
| ;1. Identify the active PHP version:
| |
| <syntaxhighlight lang="bash">
| |
| php --version
| |
| </syntaxhighlight>
| |
| Look for the first two numbers (e.g., ''8.2'', ''8.1'', ''7.4'').
| |
|
| |
| ;2. Locate all ionCube configuration files:
| |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| | # Find ionCube config files |
| grep ioncube /etc/* -Inri | | grep ioncube /etc/* -Inri |
| </syntaxhighlight>
| |
| This search will list all locations in <code>/etc</code> that contain ionCube references. Common locations include:
| |
| * <code>/etc/php.d/01_ioncube.ini</code>
| |
| * <code>/etc/php.d/ioncube.ini</code>
| |
| * <code>/etc/php.ini</code>
| |
|
| |
|
| ;3. Review the ionCube configuration files:
| | # Check what version they reference |
| <syntaxhighlight lang="bash">
| |
| cat /etc/php.d/01_ioncube.ini | | cat /etc/php.d/01_ioncube.ini |
| cat /etc/php.d/ioncube.ini
| |
| </syntaxhighlight>
| |
| Check which PHP version the loader was compiled for. For example, a loader named <code>ioncube_loader_lin_7.4.so</code> will not work if your active PHP version is 8.1 or 8.2.
| |
|
| |
|
| ;4. Remove or comment out configuration files pointing to incorrect PHP versions:
| | # Remove or comment out configs for wrong PHP version |
| <syntaxhighlight lang="bash">
| | sudo rm /etc/php.d/01_ioncube.ini # Or edit and comment with ; |
| # Remove specific files pointing to wrong PHP version
| |
| sudo rm /etc/php.d/01_ioncube.ini | |
|
| |
|
| # Or comment out lines by adding ; at the beginning | | # Also check main php.ini |
| sudo nano /etc/php.d/01_ioncube.ini
| |
| # Change: zend_extension = /path/to/wrong/loader.so
| |
| # To: ; zend_extension = /path/to/wrong/loader.so
| |
| </syntaxhighlight>
| |
| | |
| ;5. Ensure only the correct ionCube loader for the active PHP version is enabled:
| |
| After removing incorrect configurations, verify that a correct ionCube loader exists and is enabled. The file should reference a loader compiled for your active PHP version.
| |
| | |
| ;6. Remove redundant ionCube entries from the main php.ini:
| |
| <syntaxhighlight lang="bash">
| |
| grep -n ioncube /etc/php.ini | | grep -n ioncube /etc/php.ini |
| </syntaxhighlight>
| |
| If ionCube references are found in your main <code>php.ini</code> file:
| |
| <syntaxhighlight lang="bash">
| |
| sudo nano /etc/php.ini
| |
| # Comment out or remove these duplicate entries
| |
| </syntaxhighlight>
| |
|
| |
| ;7. Restart the web server service:
| |
| <syntaxhighlight lang="bash">
| |
| # On RHEL/CentOS/AlmaLinux/Fedora:
| |
| sudo systemctl restart httpd
| |
|
| |
|
| # On Debian/Ubuntu: | | # Restart web server |
| sudo systemctl restart apache2 | | sudo systemctl restart httpd # Or apache2 / php-fpm |
| # or
| |
| sudo systemctl restart php-fpm
| |
| </syntaxhighlight> | | </syntaxhighlight> |
|
| |
|
| ;8. Verify the fix:
| | === Empty Path Error After Reinstall === |
| <syntaxhighlight lang="bash">
| |
| php --version
| |
| </syntaxhighlight>
| |
| The command should now execute successfully without errors. The GUI should be accessible again.
| |
| | |
| '''Note:''' If fixing the ionCube configuration files does not resolve the issue, the ionCube loader may not be installed for your current PHP version. In that case, download and install the appropriate ionCube loader from the [https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz official ionCube website].
| |
| | |
| == Database Schema Updates for Major Version Upgrades == | |
| When performing a major version upgrade (e.g., from v25.2 to v25.3 or later), the database schema may undergo changes. While the automatic schema check (<code>?check_tables=1</code>) handles many simple changes, some upgrades require manual intervention.
| |
| | |
| === Automatic Schema Update (Minor Changes) ===
| |
| For most schema changes, you can use the integrated schema check:
| |
| * Append <code>?check_tables=1</code> to your GUI URL (e.g., <code>http://your-gui.com/?check_tables=1</code>)
| |
| * Or navigate to '''Tools → System Status → Check MySQL Schema'''
| |
| * Review any listed changes and click '''Start Upgrade / Run SQL'''
| |
| | |
| === Manual ALTER Commands (Major Changes) ===
| |
| After a major version upgrade, the VoIPmonitor sniffer may recommend specific database ALTER commands in its logs. Follow this procedure:
| |
|
| |
|
| ;1. Restart the sniffer service:
| | If GUI fails with "empty path" error in <code>fce_config.php</code>, the <code>configuration.php</code> was corrupted: |
| <syntaxhighlight lang="bash"> | |
| sudo systemctl restart voipmonitor
| |
| </syntaxhighlight> | |
|
| |
|
| ;2. Check the logs for ALTER recommendations:
| |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| # On systems using journalctl | | # Restore from backup |
| sudo journalctl -u voipmonitor -n 50 | grep -i "alter" | | sudo cp /var/www/html-backup-YYYY-MM-DD/config/configuration.php /var/www/html/config/ |
| | |
| # On systems using syslog
| |
| sudo tail -n 50 /var/log/syslog | grep -i "alter"
| |
| </syntaxhighlight> | | </syntaxhighlight> |
|
| |
|
| ;3. '''Important Timing Considerations:'''
| | {{Tip|If no backup exists, navigate to GUI URL to re-run the installation wizard and enter database credentials.}} |
| * ALTER commands lock tables and will temporarily pause CDR ingestion
| |
| * '''Run ALTER commands during off-peak hours''' to minimize production impact
| |
| * You can run the ALTER commands directly in the database while the sniffer continues to capture packets
| |
|
| |
|
| ;4. Execute the ALTER commands:
| | === Corrupted License File === |
| Open the MySQL/MariaDB prompt and paste the output from the logs:
| |
| <syntaxhighlight lang="sql">
| |
| mysql -u root -p
| |
| -- (Paste the ALTER commands here)
| |
| </syntaxhighlight>
| |
|
| |
|
| ;5. After running ALTERs, restart the sniffer:
| | If GUI asks for license token but you have a valid license: |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| sudo systemctl restart voipmonitor | | sudo rm /var/www/html/key.php |
| </syntaxhighlight> | | </syntaxhighlight> |
| | Refresh GUI and click '''"get license key"''' to fetch a fresh copy. |
|
| |
|
| === Migration Instance Alternative (High-Traffic Environments) === | | === Re-activating License After Fresh Install === |
| If you cannot afford the downtime caused by ALTER commands locking tables, consider using the '''migration instance method''':
| |
| | |
| ;1. Set up a new MySQL/MariaDB instance with the latest schema
| |
| ;2. Configure a migration sensor to read from the old database and write to the new one
| |
| ;3. The migration sensor replays all CDRs to the new instance with the updated schema
| |
| ;4. Once migration is complete, switch the GUI and sensors to use the new database
| |
| ;5. This approach avoids production impact but requires temporary storage for the duplicate database
| |
|
| |
|
| == Troubleshooting ==
| | # '''Before reinstall:''' Copy ''licensetoken'' from '''Settings → License''' |
| === GUI Fails to Load with Empty Path Error After Reinstallation ===
| | # '''After reinstall:''' Paste token into activation form and click '''"get/update license key"''' |
|
| |
|
| If the GUI fails to load after reinstallation and displays an error mentioning empty paths in <code>fce_config.php</code> or similar configuration files, this indicates that the <code>configuration.php</code> file became empty or corrupted during the installation process. | | If Hardware ID changed (new server), click '''"Get License"''' in '''Settings → License''' to re-synchronize. |
|
| |
|
| {{Warning|The installation script attempts to preserve <code>configuration.php</code> and <code>key.php</code>. However, extraction errors (such as disk space issues) can leave these files in an incomplete or empty state, causing the GUI initialization to fail.}}
| | == See Also == |
| | * [[GUI_installation]] - Fresh GUI installation |
| | * [[GUI_troubleshooting]] - General GUI issues |
| | * [[License]] - License management |
| | * [[Redundant_database]] - Migration instance method |
|
| |
|
| ;Solution: Restore configuration.php from backup
| | == AI Summary for RAG == |
|
| |
|
| # Locate your backup created in [[#Step 2: Back Up Your Current GUI Directory]]:
| | '''Summary:''' Step-by-step guide for reinstalling VoIPmonitor web GUI to fix corrupted installations or adapt to PHP version changes. Process preserves CDRs, PCAPs, and configuration. Four main steps: (1) Check PHP version with <code>php --version</code>, (2) Backup web directory and separately backup <code>configuration.php</code>/<code>key.php</code>, (3) Download correct GUI package using wget with <code>phpver=</code> parameter matching your PHP version, run <code>install-gui.sh</code>, (4) Hard browser refresh (Ctrl+Shift+R). Critical warnings: extraction errors (disk full) can leave configuration.php empty causing "empty path" errors in fce_config.php - restore from backup. Package validation: <code>tar -tvf gui.tar.gz | grep "vm-"</code> should show vm-i686 and vm-x86_64 binaries. Key troubleshooting: ionCube errors after PHP upgrade - re-download GUI for correct PHP version (do NOT downgrade PHP); 500 errors - find and fix ionCube config files with <code>grep ioncube /etc/* -Inri</code>; empty path errors - restore configuration.php from backup; license issues - delete key.php and re-fetch. Database schema updates: use <code>?check_tables=1</code> for automatic updates, or check logs for ALTER commands after major upgrades (run during off-peak hours as ALTERs lock tables). |
| #:<syntaxhighlight lang="bash">ls -la /var/www/html-backup-*/</syntaxhighlight>
| |
| # Find the backup directory with the date when you performed the reinstallation.
| |
| | |
| # Restore the <code>configuration.php</code> file from the backup:
| |
| #:<syntaxhighlight lang="bash">
| |
| # Replace YYYY-MM-DD with your backup date
| |
| sudo cp /var/www/html-backup-YYYY-MM-DD/config/configuration.php /var/www/html/config/configuration.php
| |
| #</syntaxhighlight>
| |
| | |
| # If your GUI uses the root web directory:
| |
| #:<syntaxhighlight lang="bash">
| |
| sudo cp /var/www/html-backup-YYYY-MM-DD/configuration.php /var/www/html/configuration.php
| |
| #</syntaxhighlight>
| |
| | |
| # Perform a hard refresh in your browser (Ctrl+Shift+R or Cmd+Shift+R).
| |
| | |
| {{Tip|If you cannot access your backup, you will need to re-run the installation wizard to recreate the configuration. Navigate to the GUI URL in your browser and follow the setup prompts to enter your database credentials.}}
| |
| | |
| === Missing GUI Files After Installation ===
| |
| | |
| If you have completed the installation but GUI files appear to be missing or incomplete (e.g., the GUI shows errors or missing features), this typically indicates that the package extraction did not complete successfully.
| |
| | |
| ;1. Check the tar command output:
| |
| Review the output from the <code>tar</code> extraction step during installation. Look for error messages such as:
| |
| * '''"No space left on device"''' - Your disk is full, preventing files from being written
| |
| * '''"Cannot write: No space left on device"''' - Same issue as above
| |
| * '''"tar: Error exit delayed from previous errors"''' - May indicate incomplete extraction
| |
| | |
| ;2. Verify available disk space:
| |
| <syntaxhighlight lang="bash">
| |
| df -h
| |
| </syntaxhighlight>
| |
| Check that your disk partition has sufficient free space (at least several GB for a complete VoIPmonitor installation). If the disk is full, you must:
| |
| * Remove unnecessary files or old compressed PCAP files to free up space
| |
| * Move data to another partition or external storage
| |
| * Consider upgrading your disk capacity
| |
| | |
| ;3. Re-download and reinstall with sufficient disk space:
| |
| After freeing up disk space, repeat the installation procedure starting from [[#Step 1: Identify Your Server's PHP Version]].
| |
| | |
| '''Note:''' If disk space was the issue, reinstalling without first freeing space will fail again, producing the same incomplete installation.
| |
| | |
| === Corrupted License File ===
| |
| If, after reinstalling, the GUI asks for a license token but you already have a valid license, your <code>key.php</code> file may have been corrupted.
| |
| | |
| ;Solution:
| |
| # Remove the old license file from your GUI's installation directory:
| |
| #:<syntaxhighlight lang="bash">sudo rm /var/www/html/key.php</syntaxhighlight>
| |
| # Refresh the GUI page in your browser.
| |
| # You will be prompted to enter your license token again. Click the '''"get license key"''' button to have the system automatically fetch and install a fresh copy of your <code>key.php</code> file.
| |
| | |
| === Re-activating License After Fresh Database Install ===
| |
| If you perform a fresh installation of the VoIPmonitor database (or a complete OS re-install where the web directory was reset), you can quickly re-activate your license using the ''licensetoken'' field without needing to contact support.
| |
| | |
| ;Before the reinstall:
| |
| # Log in to your current VoIPmonitor GUI.
| |
| # Navigate to '''Settings > License'''.
| |
| # Copy the entire ''licensetoken'' string displayed on this page.
| |
| | |
| ;After the fresh database install and new GUI setup:
| |
| # Access the VoIPmonitor GUI (you will be presented with the license activation/welcome form).
| |
| # Paste the previously copied ''licensetoken'' into the form.
| |
| # Click the '''"get/update license key"''' button to download and activate your license for the new setup.
| |
| | |
| '''Note:''' If your Hardware ID (HWID) has changed (e.g., you moved to a new server), you can resolve this by clicking the '''"Get License"''' button in '''Settings > License'''. The system will automatically re-synchronize your license with the current server's HWID. Only contact VoIPmonitor support if the error persists after clicking "Get License" or if you need to run both old and new systems concurrently during migration (requires a temporary trial license).
| |
| | |
| == AI Summary for RAG ==
| |
| '''Summary:''' Step-by-step guide for reinstalling the VoIPmonitor web GUI to fix corrupted installations or adapt to PHP version changes. The process preserves user data (CDRs, PCAPs) and configuration. Four main steps: (1) Check PHP version with php --version, (2) Backup web directory (CRITICAL - separate backup of configuration.php and key.php), (3) Download correct GUI package using wget with phpver= parameter (e.g., phpver=82 for PHP 8.2), run install-gui.sh, (4) Hard browser refresh (Ctrl+Shift+R). Important: Extraction errors (disk full) can leave configuration.php empty, causing GUI failures with "empty path" errors in fce_config.php - restore from /var/www/html-backup-YYYY-MM-DD/config/configuration.php. The install-gui.sh script automatically preserves config/configuration.php and sets permissions. Alternative manual method: empty directory, unpack with cp -r, set ownership with chown -R www-data, restore config from backup. Optional package validation: tar -tvf gui.tar.gz | grep "vm-" checks for required binaries (vm-i686, vm-x86_64). Key troubleshooting: ionCube errors after PHP upgrade - re-download GUI for correct PHP version (do NOT downgrade PHP); 500 errors - locate and fix ionCube config files with grep ioncube /etc/* -Inri, remove configs pointing to wrong PHP version; empty path/configuration errors after reinstall - restore configuration.php from backup; license issues - delete key.php and re-fetch; missing files - check disk space with df -h. Database schema updates: use ?check_tables=1 for automatic updates, or check logs for ALTER commands after major upgrades (run during off-peak hours as ALTERs lock tables). | |
|
| |
|
| '''Keywords:''' reinstall GUI, corrupted installation, PHP upgrade, ionCube Loader, ionCube error, 500 server error, install-gui.sh, key.php, license, phpver, check_tables, ALTER commands, database schema, disk space, tar extraction, vm-i686, vm-x86_64, package validation, manual unpacking, chown, ownership, configuration restoration, configuration.php, empty path error, fce_config.php | | '''Keywords:''' reinstall GUI, corrupted installation, PHP upgrade, ionCube Loader, ionCube error, 500 server error, install-gui.sh, key.php, license, phpver, check_tables, ALTER commands, database schema, disk space, tar extraction, configuration.php, empty path error, fce_config.php, offline installation |
|
| |
|
| '''Key Questions:''' | | '''Key Questions:''' |
| * How do I reinstall the VoIPmonitor GUI? | | * How do I reinstall the VoIPmonitor GUI? |
| * How can I fix the GUI after changing my server's PHP version? | | * How do I fix the GUI after changing PHP version? |
| * The GUI fails with an ionCube Loader error, how do I fix it? | | * How do I fix ionCube Loader errors? |
| * How do I fix a 500 server error after a system update? | | * How do I fix 500 server error after system update? |
| * How do I locate ionCube configuration files on my system? | | * How do I locate ionCube configuration files? |
| * How do I fix a corrupted key.php license file? | | * How do I fix corrupted key.php license file? |
| * What is the command to download the latest GUI for a specific PHP version? | | * What command downloads GUI for specific PHP version? |
| * How do I update the database schema after a major GUI upgrade? | | * How do I update database schema after major upgrade? |
| * What should I do if GUI files are missing after installation? | | * How do I restore configuration.php from backup? |
| * How can I validate a GUI package before installation?
| | * How do I re-activate license after fresh install? |
| * How do I re-activate my license after a fresh database install? | |
| * The GUI fails to load with an empty path error in fce_config.php after reinstalling, how do I fix it?
| |
| * How do I restore configuration.php from backup after GUI reinstallation?
| |
This guide provides a step-by-step process for safely reinstalling the VoIPmonitor web GUI without losing your data or configuration.
When to Reinstall
A reinstallation overwrites GUI application files while preserving your data (CDRs, PCAPs) and configuration (config/configuration.php). Use this procedure when:
- A GUI upgrade failed due to power loss, full disk, or other interruption
- The GUI fails to load after a PHP version upgrade
- Apache shows the default welcome page instead of VoIPmonitor
- Suspected file corruption in the web directory
ℹ️ Note: This guide assumes you have a previously working GUI with all PHP dependencies (ionCube Loader) already installed.
Installation Steps
Step 1: Identify PHP Version
The GUI package must match your PHP major version:
Note the first two numbers (e.g., 8.1, 8.2, 7.4).
⚠️ Warning: CLI PHP version may differ from web server PHP version. Create phpinfo(); test file to verify web server version if in doubt.
Step 2: Backup Current GUI
sudo cp -a /var/www/html /var/www/html-backup-$(date +%F)
⚠️ Warning: Always keep a separate backup of configuration.php and key.php. If these become empty during installation, the GUI will fail with "empty path" errors.
Step 3: Download and Install
mkdir /tmp/voipmonitor-gui-install
cd /tmp/voipmonitor-gui-install
# Replace phpver=81 with your version (82, 81, 74, etc.)
wget "https://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81" -O gui.tar.gz
# Extract and install
tar xzf gui.tar.gz
cd voipmonitor-gui-*/scripts/
sudo bash install-gui.sh ../../gui.tar.gz
Press Enter to confirm the default installation path. The script preserves your configuration.php and sets permissions automatically.
💡 Tip: Validate package before install: tar -tvf gui.tar.gz | grep "vm-" should show vm-i686 and vm-x86_64 binaries.
Alternative: Manual Installation
If the automated script fails:
# Empty web directory (careful!)
sudo rm -rf /var/www/html/*
# Unpack and set ownership
cd /tmp/voipmonitor-gui-install
tar xzf gui.tar.gz
cp -r voipmonitor-gui-*/. /var/www/html/
sudo chown -R www-data /var/www/html # Use "apache" on RHEL/CentOS
# Restore configuration from backup
sudo cp /var/www/html-backup-$(date +%F)/config/configuration.php /var/www/html/config/
⚠️ Warning: Watch for "No space left on device" errors during tar extraction. Check disk space: df -h
Step 4: Finalize in Browser
- Open the VoIPmonitor GUI in your browser
- Perform a hard refresh: Ctrl+Shift+R (or Cmd+Shift+R on Mac)
This ensures the browser loads new assets and performs database schema checks.
Offline Installation
For servers without internet access:
- On a machine with internet: Download GUI package using wget command from Step 3
- Transfer: Copy
gui.tar.gz to the offline server via SCP or USB
- On offline server: Follow Steps 2-4 above
Database Schema Updates
After major version upgrades, database schema may need updates.
Automatic (minor changes):
Manual (major changes):
# Check logs for ALTER recommendations
sudo journalctl -u voipmonitor -n 50 | grep -i "alter"
# Execute in MySQL (run during off-peak hours - ALTERs lock tables)
mysql -u root -p
# Paste ALTER commands from logs
For high-traffic environments, consider the migration instance method to avoid downtime. See Redundant_database for details.
Troubleshooting
ionCube Loader Error
If GUI displays ionCube error (including "undefined symbol: zend_string_initerned") after PHP upgrade:
⚠️ Warning: Do NOT downgrade PHP. VoIPmonitor provides GUI packages for PHP 7.4, 8.0, 8.1, and 8.2.
Solution: Re-download GUI for your web server's PHP version:
# First verify web server PHP version (may differ from CLI)
echo '<?php phpinfo(); ?>' > /var/www/html/test.php
# Check http://your-server/test.php, then remove test file
# Re-download correct version
wget "https://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=82" -O gui.tar.gz
# Follow Step 3 installation
Alternative: Download ionCube directly from ioncube.com and configure manually.
500 Server Error (ionCube Config)
After system update, 500 errors may indicate ionCube configs pointing to wrong PHP version:
# Find ionCube config files
grep ioncube /etc/* -Inri
# Check what version they reference
cat /etc/php.d/01_ioncube.ini
# Remove or comment out configs for wrong PHP version
sudo rm /etc/php.d/01_ioncube.ini # Or edit and comment with ;
# Also check main php.ini
grep -n ioncube /etc/php.ini
# Restart web server
sudo systemctl restart httpd # Or apache2 / php-fpm
Empty Path Error After Reinstall
If GUI fails with "empty path" error in fce_config.php, the configuration.php was corrupted:
# Restore from backup
sudo cp /var/www/html-backup-YYYY-MM-DD/config/configuration.php /var/www/html/config/
💡 Tip: If no backup exists, navigate to GUI URL to re-run the installation wizard and enter database credentials.
Corrupted License File
If GUI asks for license token but you have a valid license:
sudo rm /var/www/html/key.php
Refresh GUI and click "get license key" to fetch a fresh copy.
Re-activating License After Fresh Install
- Before reinstall: Copy licensetoken from Settings → License
- After reinstall: Paste token into activation form and click "get/update license key"
If Hardware ID changed (new server), click "Get License" in Settings → License to re-synchronize.
See Also
AI Summary for RAG
Summary: Step-by-step guide for reinstalling VoIPmonitor web GUI to fix corrupted installations or adapt to PHP version changes. Process preserves CDRs, PCAPs, and configuration. Four main steps: (1) Check PHP version with php --version, (2) Backup web directory and separately backup configuration.php/key.php, (3) Download correct GUI package using wget with phpver= parameter matching your PHP version, run install-gui.sh, (4) Hard browser refresh (Ctrl+Shift+R). Critical warnings: extraction errors (disk full) can leave configuration.php empty causing "empty path" errors in fce_config.php - restore from backup. Package validation: tar -tvf gui.tar.gz | grep "vm-" should show vm-i686 and vm-x86_64 binaries. Key troubleshooting: ionCube errors after PHP upgrade - re-download GUI for correct PHP version (do NOT downgrade PHP); 500 errors - find and fix ionCube config files with grep ioncube /etc/* -Inri; empty path errors - restore configuration.php from backup; license issues - delete key.php and re-fetch. Database schema updates: use ?check_tables=1 for automatic updates, or check logs for ALTER commands after major upgrades (run during off-peak hours as ALTERs lock tables).
Keywords: reinstall GUI, corrupted installation, PHP upgrade, ionCube Loader, ionCube error, 500 server error, install-gui.sh, key.php, license, phpver, check_tables, ALTER commands, database schema, disk space, tar extraction, configuration.php, empty path error, fce_config.php, offline installation
Key Questions:
- How do I reinstall the VoIPmonitor GUI?
- How do I fix the GUI after changing PHP version?
- How do I fix ionCube Loader errors?
- How do I fix 500 server error after system update?
- How do I locate ionCube configuration files?
- How do I fix corrupted key.php license file?
- What command downloads GUI for specific PHP version?
- How do I update database schema after major upgrade?
- How do I restore configuration.php from backup?
- How do I re-activate license after fresh install?