i'm trying to connect to my Azure SQL db using PHP that is run by my other server every night at 00:00 via cronjob. When it runs shows this error in logs:
Error connecting to SQL Server.PDOException Object
(
[message:protected] => could not find driver
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /home3/nappuntx/public_html/modifiche/export.php
[line:protected] => 73
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /home3/nappuntx/public_html/modifiche/export.php
[line] => 73
[function] => __construct
[class] => PDO
[type] => ->
[args] => Array
(
[0] => sqlsrv:server = tcp:prgsophie.database.windows.net,1433; Database = test_db
[1] => userTest
[2] => pswtest
)
)
)
[previous:Exception:private] =>
[errorInfo] =>
)
1
As mentioned here: https://learn.microsoft.com/it-it/sql/connect/php/microsoft-php-driver-for-sql-server?redirectedfrom=MSDN&view=sql-server-ver15 I Should install PDO Drivers in my Linux Server? I'm not sure because i've read here: https://www.php.net/manual/en/pdo.installation.php " PDO and the PDO_SQLITE driver is enabled by default as of PHP 5.1.0. You may need to enable the PDO driver for your database of choice; consult the documentation for database-specific PDO drivers to find out more about that. " so theoretically it is already included in my PHP driver. I use PHP Version 7.2.26 on my Linux Red Hat server... Waiting for support, thank you.


php -m | grep 'pdo_sqlite'at the shell's command line, do you get anything back?mysqli, it can do anything PDO can