So Apache has its own service account, and when i load a page from the URL, on my browser, it loads runs the page with the service account and it works fine, no errors.
But when i do php -q "LOCAL PATH TO FILE", on root account from the terminal over SSH i get errors such as:
For MySQLi = "Call to undefined function mysqli_connect()"
For MySQL = "mysql_connect(): No such file or directory"
Now the thing is, it does work fine if i load the page from my browser, just not when i run it from terminal.
I need to be able to run it from the terminal because of CronJobs.
This originally worked, but im not sure why it has stopped working, apparently i need to install a PHP module to get it to work, but im not sure because im having a hard time finding results that are the same situation as my issue.
I am using CentOS.
Thanks
php -ifrom the command line, verify that if shows MySQLi as being enabled, and if (when) it is not, go to the ini file identified near the top of the output and enable it.-c /path/to/php.inito your command line.