Home > Backend Development > PHP Tutorial > Detailed explanation of steps to connect SQLServer2005 database with PHP_PHP tutorial

Detailed explanation of steps to connect SQLServer2005 database with PHP_PHP tutorial

WBOY
Release: 2016-07-13 17:41:02
Original
1139 people have browsed it

Environment: IIS6.0 PHP5 SQL Server2005

When installing SQL Server, select the mixed login mode, that is, windows and sql server authentication mode.

Steps:
1. First configure PHP5 to connect to MS SQL Server as usual
Open the extension=php_mssql.dll option in PHP.ini (remove the previous; sign)
mssql.secure_connection = Off

2. Download the correct version of ntwdblib.dll (2000.80.194.0)

3. Overwrite c:windowssystem32 twdblib.dll

4. Override php twdblib.dll (sometimes if this step is not successful, put the php5ts.dll that PHP depends on in the system32 directory)

5. Run SQL Server Configuration Manager: SQL Server Configuration Manager, Open Protocols

6. Allow named pipes "named pipes" and "tcp/ip"

7. Right-click "tcp/ip" and open the Properties tab "IP addresses"

8. Fill in 1433 in the TCP Dynamic Ports "TCP Dynamic Ports" (after testing, you can actually leave it blank here)

9. Restart SQL Server, IIS and PHP

10. Use the host name and port number to connect, mssql_connect("localhost,1433", "sa", ""); (I tried it, but it doesn't work

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486168.htmlTechArticleEnvironment: IIS6.0 PHP5 SQL Server2005 When installing SQL Server, select the mixed login mode, that is, windows and sql server identities Authentication mode. Steps: 1. First configure the PHP5 connection as usual...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template