XAMPP 上的 PHP 5.4 和 MsSQL [英] PHP 5.4 and MsSQL on XAMPP

查看:25
本文介绍了XAMPP 上的 PHP 5.4 和 MsSQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为 PHP 运行 mssql 驱动程序,但出了点问题.
我设法为 mssql 获得了正确的驱动程序,然后在 php.ini 中添加了扩展,但 PHP 仍在运行 "--without-mssql" "--without-pdo-mssql".我在 Windows XP SP3 上的 Apache 2.2 下运行 PHP 5.4.
如何启动 mssql 驱动程序?

I'm trying to run mssql driver for PHP, but something goes wrong.
I managed to get the right drivers for mssql, then added the extensions in php.ini, but PHP is still running "--without-mssql" "--without-pdo-mssql". I'm running PHP 5.4 under Apache 2.2 on Windows XP SP3.
How to start the mssql drivers?

推荐答案

我在这个网站上找到了一个很棒的教程和解释:

I have found a great tutorial and explanation on this website:

http://bendustries.co/wp/设置-xampp-to-work-with-mssql/

您需要做的就是从这里下载:https://www.microsoft.com/en-us/下载/details.aspx?id=20098

All you need to do is download from here : https://www.microsoft.com/en-us/download/details.aspx?id=20098

两个文件调用:

  1. php_pdo_sqlsrv.dll
  2. php_pdo_sqlsrv.dll

然后将其放入 php\ext 文件夹中.然后你需要在 "Dynamic Extensions"

And place then inside the php\ext folder. Then you need to add those two lines under "Dynamic Extensions"

extension=php_sqlsrv.dll

extension=php_sqlsrv.dll

extension=php_pdo_sqlsrv.dll

extension=php_pdo_sqlsrv.dll

保存你的php.ini文件并重启apache,这个过程在我尝试了其他几种方法后在win7上对我有用!

Save your php.ini file and restart apache, This process worked for me on win7 after I tried several other methods !

这篇关于XAMPP 上的 PHP 5.4 和 MsSQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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