Home >Backend Development >PHP Tutorial >php56 is used in combination with sql server2008.

php56 is used in combination with sql server2008.

WBOY
WBOYOriginal
2016-07-29 09:08:201334browse
Due to some reasons, I need to use php and Sqlserver2008 database. I found some information on the Internet. Basically, they say that I need to download the Microsoft driver and put it in the ext folder, and then add the following configuration in php.ini:
[PHP_PDO_SQLSRV ]

extension=php_pdo_sqlsrv_56_ts.dll

[PHP_SQLSRV]

extension=php_sqlsrv_56_ts.dll

But Even if you follow the relevant steps, you can't run it successfully. The reason is that the official sqlsrv3 .0/3.2, etc. are all 32-bit and do not provide relevant downloads for 64-bit users. By chance, http://blog.csdn.net/aw951753aw/article/details/44339889 I saw the introduction in

We need to download the 64-bit sqlsrv3.0/3.2 ourselves. Download address http://pan.baidu.com/s/1dDIRpJF .

Let me introduce the main steps below:

1. Install php

2. Install sql server2008

3. Download 64-bit version sqlsrv3.0/3.2. Download address http://pan.baidu.com/s/1dDIRpJF .

4. The downloaded sqlsrv3.0/3.2 is a decompressed exe and run, you can get the relevant dll file

5. Put The required dll files are placed in phpext and System32.

6. Modify the php.ini file and add

[PHP_PDO_SQLSRV] as follows

extension= php_pdo_sqlsrv_56_ts.dll

[PHP_SQLSRV]

extension=php_sqlsrv_56_ts.dll

[The 56 here represents the version. My php version is 5.6, so use this. In addition, there is a difference between ts and nts. You can base it on php judgment]

php56结合sql server2008使用。

When successful, you can see the sqlsrv below.

php56结合sql server2008使用。

In addition, we need to use sqlsrv related functions after successful installation.

Please refer to http://www.php.net/manual/zh/book.sqlsrv.php.

The above introduces the use of php56 in conjunction with sql server2008. , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn