在php.ini文件中添加扩展项后,sqlsrv驱动程序未出现在WAMP服务器phphinfo()上 [英] sqlsrv drivers doesn't appear on a WAMP server phphinfo() after adding the extension entries in the php.ini file

查看:68
本文介绍了在php.ini文件中添加扩展项后,sqlsrv驱动程序未出现在WAMP服务器phphinfo()上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立一个从PHP到SQL Server 2012的数据库连接.我在装有PHP 5.5.12的Windows机器(64位)上安装了一个wamp服务器(64位),并且在同一台机器上安装了SQL Server 2012已安装.

official_link 提取的sqlsrv驱动程序

将提取的驱动程序php_sqlsrv_55_ts.dll复制到php\ext文件夹中,然后将php.ini文件更改为包含扩展名.

extension = php_sqlsrv_55_ts.dll; extension = php_pdo_sqlsrv_55_ts.dll;

现在我尝试了

<?php
  phpinfo();
 ?>

我看到以下信息,其中没有任何SQL Server信息.

似乎没有成功配置SQL Server连接.有人可以指导我我在这里缺少什么吗?

解决方案

64位WAMP服务器无法使用驱动程序extension = php_sqlsrv_55_ts.dll进行连接;扩展名= php_pdo_sqlsrv_55_ts.dll;

因此,我安装了32位版本的WAMP服务器,现在它可以正常工作.

I wanted to setup a database connection from PHP to SQL server 2012.I have a wamp server(64 bit) set up on a windows machine(64 bit) with PHP 5.5.12 and on the same machine I have SQL server 2012 installed.

Extracted sqlsrv drivers from official_link

Copied the extracted drivers php_sqlsrv_55_ts.dll, extension = php_pdo_sqlsrv_55_ts.dll to php\ext folder, and then changed the php.ini file to include the extensions

extension = php_sqlsrv_55_ts.dll; extension = php_pdo_sqlsrv_55_ts.dll;

Now I tried

<?php
  phpinfo();
 ?>

I see the following information without any SQL server information in it.

Don't seem to have configured SQL server connection successfully. Could some one please guide me on what I am missing here.

解决方案

64 bit WAMP server was not able to connect using the drivers extension = php_sqlsrv_55_ts.dll; extension = php_pdo_sqlsrv_55_ts.dll;

So, I installed a 32 bit version of the WAMP server and it works fine now.

这篇关于在php.ini文件中添加扩展项后,sqlsrv驱动程序未出现在WAMP服务器phphinfo()上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆