Good afternoon all, First time poster, long time user of Librenms. I have an extremely strange issue with my installation. I always seem to have issues after running apt-get updates!
After updating my site wouldn’t open. it couldn’t load the “curl” module. After spending last night on it I was able to resolve it by enabling it in the PHP 7.4 config. After cycling apache2 I was prompted with two more extensions to install/enable. “mysqlnd” and “xml”. I was able to get mysqlmd resolved with a similar task to the “curl” issue however the “xml” extension will not load.
Thing I have done…
Removed all previous versions of PHP.
Made sure that the modules needed are installed and in the correct directory.
Ran phpinfo.php to verify Apache is pointing to the right location.
Uninstalled php7.4-xml and reinstalled it.
Here’s what happens. When I enable the extension and restart Apache I get a 500 error bad request. When I disable the extension and restart appache I get a message saying it needs to be installed. PHP needs to make up its dang mind, does it want it enabled or not???
Below is the output of Validate. Please ignore the polling errors, it works fine and I have no gaps in my graphs. Also, my install isn’t in the default location because I run a few other sites on this machine.
[OK] Composer Version: 1.9.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] Missing PHP extension: xml
[FIX]:
Please install xml
[WARN] Some devices have not been polled in the last 5 minutes. You may have performance issues.
[FIX]:
Check your poll log and see: http://docs.librenms.org/Support/Performance/
Devices:
10.0.50.50
10.80.1.95
10.80.1.96
192.168.200.5
192.168.200.6
192.168.200.7
10.0.50.30
192.168.200.17
192.168.200.22
192.168.200.20
192.168.200.11
192.168.200.15
192.168.200.4
192.168.200.9
192.168.200.23
and 8 more…
=========
My daily is also clean…
UN:/var/www/librenms$ sudo -u librenms ./daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
The only thing I’m thinkin is maybe I need to enable it??? I think I had to do that with the mysqlnd module if I’m not mistaken, but I don’t see anything about enabling that as a module.
Trust me, I’ve looked everywhere for this and XML just isn’t out there and the same solutions that fix the mysqlnd issue (thats out there a lot) don’t appear to be working for the xml.so issue.
Please let me know what you need in order to help.
Thanks!
Just a heads up, I found an article that states that installing the xml.so from 7.2 will work on 7.4. I can confirm it doesn’t and here’s my process.
sudo apt-get install php7.2-xml
sudo mv /usr/lib/php/20190902/xml.so /usr/lib/php/20190902/xml.so.old
sudo cp /usr/lib/php/20170718/xml.so /usr/lib/php/20190902/xml.so
sudo nano /etc/php/7.4/apache2/php.ini
**Uncommented the extension=xml line
sudo systemctl restart apache2
…And it breaks the server (Error 500)
Commented and I’m back to…
Missing PHP extensions. Please install and enable them on your LibreNMS server.
I checked all the logs before and after uncommented the extensions=xml line.
Quick Google-Fu indicated that php-json needed to be installed.
Ran sudo apt-get install php-json
Restarted Apache2 and checked the logs again, no change.
Looks like the issue starts with this…
Uncaught Error: Interface ‘JsonSerializable’ not found in /var/www/librenms/vendor/laravel/framework/src
However I cannot locate a solution.
sudo nano /var/log/apache2/access.log (Nothing Before enabling XML) (Nothing After enabling XML) (Nothing After adding php-json)
The daily.log shows “The requested PHP extension ext-xml is missing”
More Google-Fu indicated it needs to be installed with the below command.
sudo apt-get install php-xml
Installed, restarted apache then ran ./daily.php and ./validate.php and I’m still getting the warning message.
Updating Composer packages > LibreNMS\ComposerHelper::preInstall ^[[32mLoading composer repositories with package information^[[39m ^[[32mInstalling dependencies from lock file^[[39m ^[[37;41mYour requirements could not be resolved to an installable set of packages.^[[39;49m
Problem 1*
The requested PHP extension ext-xml * is missing from your system. Install or enable PHP’s xml extension.* Returned: 0
I was being sarcastic, sorry. So if MariaDB is running, the Database can be connected to with my Librenms config UN/PW, I’m curious what changed. I’m not doubting an apt update caused this… it happens every damn time I update my system and normally I can resolve the issues in a day and get Librenms back up to fully functioning within a day. I’m going on Day 3.