如何配置XAMPP与MSSQL一起使用? [英] How to configure XAMPP to use with MSSQL?

查看:328
本文介绍了如何配置XAMPP与MSSQL一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试配置XAMPP以与MSSQL一起使用.我正在追踪:示例,但我仍然成功.

I'm trying configure XAMPP to use with MSSQL. I'm following this: Example but I still had success.

我将文件php_pdo_sqlsrv_54_ts.dllphp_sqlsrv_54_ts.dll复制到文件夹c:\xampp\php\ext,并在c:\xampp\php\php.ini中配置了php.ini.

I copied the files: php_pdo_sqlsrv_54_ts.dll and php_sqlsrv_54_ts.dll to folder c:\xampp\php\ext and configured php.ini in c:\xampp\php\php.ini.

php.ini中,我激活了扩展:extension=php_pdo_sqlsrv_54_ts.dllextension=php_sqlsrv_54_ts.dll,并创建了PDO部分. [Pdo_sqlsrv] pdo_sqlsrv.log_severity=-1.

In php.ini I activated the extensions: extension=php_pdo_sqlsrv_54_ts.dll and extension=php_sqlsrv_54_ts.dll and created PDO section. [Pdo_sqlsrv] pdo_sqlsrv.log_severity=-1.

我正在使用XAMPP v3.2.1和PHP 5.6.11

I am using XAMPP v3.2.1 and PHP 5.6.11

我如何使它起作用?

推荐答案

对于PHP5.6,您需要下载

For PHP5.6 vou need download SQLSRV32.EXE, after it put the php_pdo_sqlsrv_56_ts.dll and php_sqlsrv_56_ts.dll on ext folder and finally register those extension on php.ini, like this:

extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll

重新启动apache并尝试phpinfo(),否则您可以使用 getAvailableDrivers()

Restart apache and try phpinfo()or you could use getAvailableDrivers()

<?php
   echo "<pre>";
   print_r(PDO::getAvailableDrivers());

这篇关于如何配置XAMPP与MSSQL一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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