无法安装 PHP 的 SQL Server 2017 驱动程序



我从视频教程中学到了如何安装SQL Server 2017 for PHP-我完全按照教程所说的那样做了-但是我仍然看不到PHP信息列表中的扩展名。

我安装了:

PHP 版本 7.1.9
Xampp 服务器 v3.2.2
Microsoft SQL Server 2017
SQL 本机客户端

我添加了以下名称的文件:

;extension=php_sqlsrv_7_nts_x64.dll
;extension=php_pdo_sqlsrv_7_nts_x64.dll
;extension=php_pdo_sqlsrv_7_ts_x64.dll
;extension=php_sqlsrv_7_ts_x64.dll

到我的 php.ini 文件中,当然我也将它们放入我的 ext 目录中。

这是我的 SQL 信息输出:

PHP Version 7.1.9
System  Windows NT DESKTOP-JTKEMP6 10.0 build 15063 (Windows 10) i586
Build Date  Aug 30 2017 18:33:21
Compiler    MSVC14 (Visual C++ 2015)
Architecture    x86
Configure Command   cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-pdo-oci=c:php-snap-builddeps_auxoraclex86instantclient_12_1sdk,shared" "--with-oci8-12c=c:php-snap-builddeps_auxoraclex86instantclient_12_1sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"
Server API  Apache 2.0 Handler
Virtual Directory Support   enabled
Configuration File (php.ini) Path   C:Windows
Loaded Configuration File   C:xamppphpphp.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed    (none)
PHP API 20160303
PHP Extension   20160303
Zend Extension  320160303
Zend Extension Build    API320160303,TS,VC14
PHP Extension Build API20160303,TS,VC14
Debug Build no
Thread Safety   enabled
Zend Signal Handling    disabled
Zend Memory Manager enabled
Zend Multibyte Support  provided by mbstring
IPv6 Support    enabled
DTrace Support  disabled
Registered PHP Streams  php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, https, ftps, phar
Registered Stream Socket Transports tcp, udp, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters   convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.*
Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
Configuration
apache2handler
Apache Version  Apache/2.4.27 (Win32) OpenSSL/1.0.2l PHP/7.1.9
Apache API Version  20120211
Server Administrator    postmaster@localhost
Hostname:Port   localhost:80
Max Requests    Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts    Connection: 300 - Keep-Alive: 5
Virtual Server  No
Server Root C:/xampp/apache

你不需要单独安装 php。Xampp 默认包含 php。

停止 xampp 服务器并取消注释您的 php.ini:

extension=php_sqlsrv_7_nts_x64.dll
extension=php_pdo_sqlsrv_7_nts_x64.dll
extension=php_pdo_sqlsrv_7_ts_x64.dll
extension=php_sqlsrv_7_ts_x64.dll

并再次启动 XAMPP。

相关内容

  • 没有找到相关文章

最新更新