We're using mysqli, and have been for years, and under normal usage it works just fine. The problem we have is that when we try to use exec() to run code in the background it fails, and if we capture the output we see this:
Fatal error: Class 'mysqli' not found
At the point where we try to create a new mysqli object. We can call the same code by loading the PHP file in a browser, and the code executes just fine, including the usage of mysqli. For some reason it only fails when we attempt to execute it via exec(). All the rest of the code being exec'd appears to be working just fine.
Do we need to do something special to make mysqli available when running via exec()?
We're running PHP 7.2.30 on CentOS 6.10.