Solved cacti page doesn't load after pkg upgrades

Turns out mod_php72 was not installed. # pkg install mod_php72 fixed the issue.
=============================================================

Hi,
Cacti was running for a long time without any issues. That is until after running pkg upgrade.

Now when going to cacti page it displays:

ATAL: Connection to Cacti database failed. Please ensure:
  • the PHP MySQL module is installed and enabled.
  • the database is running.
  • the credentials in config.php are valid.
When restarting apache24 is spews errors that it cannot find modules. Reason is the dir it seems to have is incorrect (only a few shown below):

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20160303/pdo_mysql.so' - Cannot open /usr/local/lib/php/20160303/pdo_mysql.so

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20160303/mysqli.so' - Cannot open /usr/local/lib/php/20160303/mysqli.so

/usr/local/lib/php has:

20170718

In php.ini dont' see 20160303 anywhere.

Where would the correct directory be set?

Thanks.
 
Turns out mod_php72 was not installed.
This can happen if you change PHP versions, the PHP modules all change accordingly but mod_php* sticks around. So you can end up with everything PHP 7.2 except mod_php.
 
Hey SirDice, yeah you're 100% right. And this is really bad when pkg upgrade can really mess things up for services.
 
The "problem" is that nothing really depends on those mod_php* packages. Which is the reason why it's "missed" when upgrading from one PHP version to another. It seems to happen consistently though, so it's just something you need to be aware of when you upgrade PHP.
 
Back
Top