The client's server is WINDOWS2008R2 x64 bit, the database is SQLServer2008 version, In the original. NET version of the Web-based system to do mobile phone version, and because the mobile phone version to support payment, must use the domain name of the 80 port, I am using ThinkPHP3.2.3 to do background development, a series of down found, really troublesome.
In IIS7.0 (the customer has installed II7.0 here is not much to say the installation process, remember to select: "CGI", "ISAPI extension ", "ISAPI filter ") Support PHP parsing: The best way is to install " PHP Manager "to manage (http://phpmanager.codeplex.com/releases/view/69115 himself 64-bit system, the following is: PHP Manager 1.2 for IIS 7-x64 version),
Put to: "http://windows.php.net/download#php-5.5" downloaded 32-bit 5.5.35 Version "VC11 x86 Thread Safe" extracted to: D:\php directory, It is important to note that because you want to connect to the SQLSERVER2008 database do not download php5.5 x64 bit version , it will cause:
"Undefined class constant ' pdo::sqlsrv_attr_encoding '
Wrong location
file:d:\php\www\thinkphp\library\think\db.class.php line:39
"
ThinkPHP3.2.3 's error hint is that Microsoft's SQLServer2008 PDO driver does not provide x64 bits .
Install the corresponding support library file, https://support.microsoft.com/en-us/kb/2977003 the latest supported Visual C + + downloads Download the corresponding C + + support library, I use the C1>x86_2012_vc11, install.
In PHP Manager, modify the configuration, point to the D:\php resolver,
In PHP Manager--PHP Extensions--and enable or disable an extension, the corresponding extension is enabled or deactivated:
Open the required modules, such as: Php_curl.dll php_mysql.dll php_mysqli.dll Php_xmlrpc.dll Php_curl.dll and so on.
Then test if phpinfo () ok
This means that the PHP environment is OK.
Next, support for Ms SQLServer2008 database support,
Go to MS website to download related files: https://msdn.microsoft.com/en-us/library/cc296170.aspx corresponding DLL files with ODBC11,
HTTPS://WWW.MICROSOFT.COM/EN-US/DOWNLOAD/DETAILS.ASPX?ID=36434 has a 32-bit version with 64-bit version (Msodbcsql_amd64.msi) ODBC11 I am x64 bit version , please install;
The 32-bit php5.5.3 corresponds to: https://www.microsoft.com/en-us/download/details.aspx?id=20098 SQLSRV32. EXE, run unzip, will: Thread-safe "php_pdo_sqlsrv_55_ts.dll", "php_sqlsrv_55_ts.dll" file, copy to D:\php\ext directory.
Editor: D:\php\php.ini File:
Date.timezone = "Asia/shanghai"
Extension_dir = "D:\php\ext"
Extension=php_sqlsrv_55_ts.dll
Extension=php_pdo_sqlsrv_55_ts.dll
"Add Application ..." above "Default Web Site", because you want to be public with IIS's previous default port 80 program
Configure the relevant options.
Test ok!
WINDOWS2008R2 x64 bit iis7.x support SQLServer2008 PHP server