PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so' - php7. +++

-1

After completing the installation of PHP7. ++ I got the following error after performing all the steps of the SQL Server PDO Driver Configuration Tutorial for php, restart apache2:

PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so' (tried: /usr/lib/php/20170718/pdo_sqlsrv.so (/usr/lib/php/20170718/pdo_sqlsrv.so: undefined symbol : php_pdo_register_driver), /usr/lib/php/20170718/pdo_sqlsrv.so.so (/usr/lib/php/20170718/pdo_sqlsrv.so.so: can not open shared object file: no such file or directory)) in Unknown on line 0

Reference: link

    
asked by anonymous 05.08.2018 / 23:49

1 answer

0

After some checks and load's of the PDO's of php7 (Apache) I have identified that 10-pdo.ini needs to be loaded before the PDO library pdo_sqlsrv.so I then removed from php.ini the following line:

extension = pdo_sqlsrv.so

I added the following file to the load in the conf.d folder: /etc/php/7.2/apache2/conf.d/ 30-pdo_sqlsrv.ini with the extension: extension = pdo_sqlsrv.so

This is also true for Cli and FPM (php.ini files) After the settings it is necessary to reload on apache2. Just remembering that before you need to follow all the installation and configuration steps for all packages and their dependencies, following the tutorial provided by Microsoft for php7 + and SQL Server ( link ) needs to be all right before It worked for me perfectly.

Now it works on Ubuntu 18.04 lts and Debian8. thanks =)

    
06.08.2018 / 00:04