Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find driver sqlsrv #960

Closed
DanielKrst55 opened this issue Mar 25, 2019 · 4 comments
Closed

Could not find driver sqlsrv #960

DanielKrst55 opened this issue Mar 25, 2019 · 4 comments

Comments

@DanielKrst55
Copy link

i change to php 7.3 and i´m getting this message:
PHP Warning: PHP Startup: Unable to load dynamic library 'sqlsrv.so' (tried: /usr/lib/php/20180731/sqlsrv.so (/usr/lib/php/20180731/sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/sqlsrv.so.so (/usr/lib/php/20180731/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/20180731/pdo_sqlsrv.so (/usr/lib/php/20180731/pdo_sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_sqlsrv.so.so (/usr/lib/php/20180731/pdo_sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

i searched in etc/php/7.3/cli/conf.d and i have the 20-sqlsrv.ini and 30-pdo_sqlsrv.ini but i don´t have those in /usr/lib/php/2018731

phpinfo()
PHP Version => 7.3.3-1+ubuntu18.04.1+deb.sury.org+1

System => Linux edsi 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64
Build Date => Mar 7 2019 20:31:49
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php/7.3/cli
Loaded Configuration File => /etc/php/7.3/cli/php.ini
Scan this dir for additional .ini files => /etc/php/7.3/cli/conf.d
Additional .ini files parsed => /etc/php/7.3/cli/conf.d/10-opcache.ini,
/etc/php/7.3/cli/conf.d/10-pdo.ini,
/etc/php/7.3/cli/conf.d/15-xml.ini,
/etc/php/7.3/cli/conf.d/20-calendar.ini,
/etc/php/7.3/cli/conf.d/20-ctype.ini,
/etc/php/7.3/cli/conf.d/20-dom.ini,
/etc/php/7.3/cli/conf.d/20-exif.ini,
/etc/php/7.3/cli/conf.d/20-fileinfo.ini,
/etc/php/7.3/cli/conf.d/20-ftp.ini,
/etc/php/7.3/cli/conf.d/20-gd.ini,
/etc/php/7.3/cli/conf.d/20-gettext.ini,
/etc/php/7.3/cli/conf.d/20-iconv.ini,
/etc/php/7.3/cli/conf.d/20-json.ini,
/etc/php/7.3/cli/conf.d/20-mbstring.ini,
/etc/php/7.3/cli/conf.d/20-phar.ini,
/etc/php/7.3/cli/conf.d/20-posix.ini,
/etc/php/7.3/cli/conf.d/20-readline.ini,
/etc/php/7.3/cli/conf.d/20-shmop.ini,
/etc/php/7.3/cli/conf.d/20-simplexml.ini,
/etc/php/7.3/cli/conf.d/20-sockets.ini,
/etc/php/7.3/cli/conf.d/20-sqlsrv.ini,
/etc/php/7.3/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.3/cli/conf.d/20-sysvsem.ini,
/etc/php/7.3/cli/conf.d/20-sysvshm.ini,
/etc/php/7.3/cli/conf.d/20-tokenizer.ini,
/etc/php/7.3/cli/conf.d/20-wddx.ini,
/etc/php/7.3/cli/conf.d/20-xmlreader.ini,
/etc/php/7.3/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.3/cli/conf.d/20-xsl.ini,
/etc/php/7.3/cli/conf.d/30-pdo_sqlsrv.ini

PHP API => 20180731
PHP Extension => 20180731
Zend Extension => 320180731
Zend Extension Build => API320180731,NTS
PHP Extension Build => API20180731,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => available, disabled

Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => zlib., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk, convert.iconv.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.3-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

@david-puglielli
Copy link
Contributor

@DanielAM96 Did you install the drivers using PECL? ie. sudo pecl install sqlsrv and sudo pecl install pdo_sqlsrv. This should install the drivers into the correct extension directory. If you already tried to install by PECL, did you get any errors?

@DanielKrst55
Copy link
Author

i tried a lot of things but i couldn't fix it, i had to uninstall php7.3 and go back to 7.2

@david-puglielli
Copy link
Contributor

It sounds like you have the drivers for PHP 7.2 installed. The 7.2 drivers won't work with 7.3, but pecl install sqlsrv should install the correct version of the drivers. If that does not work, try downloading the 7.3 drivers for your OS from here and copy them manually to your PHP extension directory (which appears to be /usr/lib/php/20180731).

@yitam
Copy link
Contributor

yitam commented Apr 18, 2019

Closing this due to inactivity @DanielAM96. Please feel free to reopen.

@yitam yitam closed this as completed Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants