I'm trying to execute a php script via command line on my synology NAS. Via web browser it's working fine. However, via CLI I'm getting an error although I loaded the extensions in /etc/php/php.ini
.
Fatal error: Uncaught PDOException: could not find driver in /volume1/web/blabla.php:16
Any ideas?
Just make sure to use the correct PHP version and PHP.ini. You can find the location of your php.ini by typing "php --ini". You can also do that on the executables php56/php70. They all have separate php.ini files. Additionaly make sure to load the correct extension directory in the applicable php.ini file.