msphpsql
msphpsql copied to clipboard
PHP Warning: PHP Startup: Unable to load dynamic library 'sqlsrv.so'
PHP 8.1.7 (cli) (built: Jun 25 2022 08:12:59) (NTS)
Not sure the version. I ran sudo pecl install sqlsrv sudo pecl install pdo_sqlsrv
Instructions from "https://docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-ver16"
Linux Mint 20.3
Error PHP Warning: PHP Startup: Unable to load dynamic library 'sqlsrv.so' (tried: /usr/lib/php/20210902/sqlsrv.so (/usr/lib/php/20210902/sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/sqlsrv.so.so (/usr/lib/php/20210902/sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so' (tried: /usr/lib/php/20210902/pdo_sqlsrv.so (/usr/lib/php/20210902/pdo_sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/pdo_sqlsrv.so.so (/usr/lib/php/20210902/pdo_sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP 8.1.7 (cli) (built: Jun 25 2022 08:12:59) (NTS)
/etc/php/8.1/mods-available/sqlsrv.ini ; priority=20 extension=sqlsrv.so
/etc/php/8.1/mods-available/pdo_sqlsrv.ini ; priority=30 extension=pdo_sqlsrv.so
neither file sqlsrv.so or pdo_sqlsrv.so on on my computer anyware.
I have attempted to remove and reinstall
Hi, we don't officially support Linux Mint. Here's the Support Matrix.
I have the same issue on windows 10 for the same files with .dll extension
Here is my php.ini (in the php folder):
and the dll files are located in the ext/ folder of PHP.
It's just a warning, not an error but when I try to connect to my SQL Server database using symfony, I got this:
I'm getting mad because I can't understand the issue and all the people who have solved this problem seems to just have put the files in ext/ folder, change their php.ini file.
Can you enable logging in php.ini? (display_errors = on
) It may be useful to see which exact dll it is trying to load.
I don't know how or why but the warning no longer appears. I didn't do anything. If you have any explanations, I would like to know.
Now I have a new message is about sqlsrv_configure. But I'm going to look around for a solution. Thanks and sorry for your time.