我想连接到 sqlserver
我有这个
php -v
PHP 7.2.14-1+0~20190113100742.14+stretch~1.gbpd83c69 (cli) (built: Jan 13
2019 10:07:43) ( NTS )Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.14-1+0~20190113100742.14+stretch~1.gbpd83c69, Copyright (c) 1999-2018, by Zend Technologies
我在哪里使用 sqlser
$conn = new PDO('sqlsrv:Server=xxx.xxx.xxx.xxx;Database=xxxx', 'user', 'pass');
我有这个问题
SQLSTATE[01000]: [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1' : file not found
但是这个文件在路径中退出
当我使用 DBLIB
$conn = new PDO( "dblib:host=$hostname;dbname=$dbname;", $username, $pw);
很多秒(2分钟)后我遇到了这个问题
SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)