Re-install the 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.
When to Reinstall the GUI
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.
Note: This guide assumes you have a previously working GUI and that all necessary PHP dependencies (like `ionCube Loader`) are already installed.
Step 1: Identify Your Server's PHP Version
The GUI package is specific to the major PHP version installed on your server. First, determine which version you are running.
php --version
Look for the first two numbers (e.g., `8.1`, `8.2`, `7.4`). You will use this to download the correct package.
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.
# 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)
Step 3: Download and Run the Installer
This process involves downloading the latest GUI package and running its installation script.
- 1. Create a temporary directory and download the GUI package
The following command downloads the latest GUI package compatible with your PHP version. Replace `81` with your version number (e.g., `82` for PHP 8.2, `74` for PHP 7.4).
mkdir /tmp/voipmonitor-gui-install cd /tmp/voipmonitor-gui-install # Example for PHP 8.1 (change phpver=81 accordingly) wget "https://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81" -O gui.tar.gz
- 2. Extract the archive and run the installer
tar xzf gui.tar.gz cd voipmonitor-gui-*/scripts/ sudo bash install-gui.sh ../../gui.tar.gz
The script will ask you to confirm the installation path. Press Enter to confirm the default path (e.g., `/var/www/html`). The script will then unpack the new GUI files over your existing installation.
Step 4: Finalize the Installation in Your Browser
After the script finishes, you must complete the process in your web browser.
- 1. Open the VoIPmonitor GUI in your browser.
- 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.
Troubleshooting
Corrupted License File
If, after reinstalling, the GUI asks for a license token but you already have a valid license, your `key.php` file may have been corrupted.
- Solution
- Remove the old license file from your GUI's installation directory.
sudo rm /var/www/html/key.php
- 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 `key.php` file.
AI Summary for RAG
Summary: This guide provides a step-by-step tutorial on how to safely reinstall the VoIPmonitor web GUI to fix issues like a corrupted installation or to adapt to a new PHP version after an OS upgrade. It clarifies that this process does not affect user data. The procedure involves four main steps: 1) Identifying the server's PHP version using `php --version`. 2) Creating a full backup of the web directory (`/var/www/html`) as a precaution. 3) Downloading the correct GUI package for the specific PHP version using `wget` and then running the included `install-gui.sh` script. 4) Finalizing the process with a hard browser refresh (Ctrl+Shift+R) to clear the cache. A troubleshooting section explains how to resolve a corrupted license by deleting the `key.php` file and re-fetching the license via the GUI. Keywords: reinstall, reinstalling, GUI, fix, corrupted, upgrade, PHP version, `install-gui.sh`, `key.php`, license, backup, web interface, `a2enmod`, `wget` Key Questions:
- How do I reinstall the VoIPmonitor GUI?
- What should I do if the GUI is broken after an update?
- How can I fix the GUI after changing my server's PHP version?
- What are the steps to run the `install-gui.sh` script?
- How do I fix a corrupted `key.php` license file?
- How can I safely back up my GUI files before a reinstallation?
- What is the command to download the latest GUI for a specific PHP version?