Recently, due to some security issues, we have to upgrade the original program to PHP5.3. I originally wanted to say that I could raise it without any pain, but I knew it only when I got started. If I used SQLServer, it would be very troublesome! After PHP5.3, SQL Server is no longer supported, because the micro-engine jumped down and did it! (For more information, see msdn. microsof.
Recently, due to some security issues, we have to upgrade the original program to PHP 5.3. I originally wanted to say that I could raise the bar without any pain, but I knew it only when I got started. If I used SQL Server, it would be very troublesome! Since PHP 5.3, SQL Server is no longer supported, because the micro-engine jumped down and did it! (Please refer to: http://msdn.microsof
Recently, due to some security issues, we have to upgrade the original program to PHP 5.3. I originally wanted to say that I could raise the bar without any pain, but I knew it only when I got started. If I used SQL Server, it would be very troublesome!
Since PHP 5.3, SQL Server is no longer supported, because the micro-engine jumped down and did it! (Please refer to: http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx)
In addition, the functions of the original mssql_xxx are no longer supported, and all functions are converted into functions of sqlsrv_xxx. Http://www.php.net/manual/en/book.sqlsrv.php)
The following describes my update Methods:
1. Microsoft Drivers 3.0 for PHP for SQL Server: http://www.microsoft.com/en-us/download/details.aspx? Id = 20098
SQLSRV20.EXE and SQLSRV30.EXE are available here. SQLSRV30.EXE supports SQL Server 2010. If you are using SQL Server 2008, just run SQLSRV20.EXE.
2. Installing SQLSRV for PHP
After the download is completed, all the DLL files are merged to the ext object under PHP. Then set php. ini.
In my settings, I use php_sqlsrv_53_nts_vc9.dll. The naming rules are as follows:
- _ 53 _: PHP 5.3. If you use PHP 5.4, use the _ 54 _ DLL.
- _ Nt _: Non-thread-safe. Because FastCGI is used, non-thread safe is used. If you use apache module or iis isapi mode, use the _ ts _ DLL.
- _ Vc9 _: Use Microsfot Visual C ++ v9 Compiler.
In addition to this, if you use the PDO method to collect data, you must use a DLL with _ PDO.
3. Set PHP. ini
You only need to add extension = php_sqlsrv_53_nts_vc9.dll.
4. PHP Program
Because I use ADOdb Database into action Library for PHP, you only need to change the DB type from mssql to mssqlnative.