IIS 7.5 Configuration php 5.4.22 link SQL 2008 (with PDO link database) _php tutorial

Source: Internet
Author: User
Tags configuration php sql 2008 vc9
Recently in contact with PHP this piece, about the PHP configuration under the Wndows system, although the online has a lot of articles, but sometimes some configuration to find trouble, so share to everyone.

First, PHP 5.4.22

Download Address http://windows.php.net/download/#php -5.4-nts-vc9-x86

Select version: PHP 5.4 (5.4.22),VC9 x86 Thread Safe (php-5.4.22-win32-vc9-x86.zip)

After decompression, change the php.ini-development file name to PHP.ini

Second, the configuration php.ini

Short_open_tag = on support notation

Date.timezone = PRC or PHP program top plus Date_default_timezone_set ("PRC"); Set the default time zone to GMT

Extension_dir = "Ext" Specifies that the extension module for PHP is ext directory

error_reporting = E_all & ~e_deprecated & ~e_strict & ~e_notice Contention does not prompt for some information data (for example: Warning

Third, support SQL 2008 database link, go to Microsoft Download Sqlsrv 3

Download Link http://www.microsoft.com/en-us/download/details.aspx?id=20098

Download down is EXE, can be extracted directly, put Php_pdo_sqlsrv_54_ts.dll and Php_sqlsrv_54_ts.dll in the EXT directory

Extension=php_pdo_sqlsrv_54_ts.dll
Extension=php_sqlsrv_54_ts.dll

Note: TS is thread safe, NTS is non-thread safe, consistent with downloaded PHP version

There are other extension libraries such as: GD Library, mbstring, SQLite, MySQL and so on these all together, not much to say.

Iv. Database Link string

< span="">< span="">PDO ("Sqlsrv:server=127.0.0.1;database=dbname", "user1", "123456");

V. Configuring PHP to IIS7.5

I'm using the win7 system, first install IIS fastcgi features, go to Control Panel > Open programs and Features > point to Turn Windows features on or off

Expand: Internet Information Services > World Wide Web Services > Application development features, select CGI

After you have installed, open IIS, you can open the process mapper in the default site

When you get in, right-click to add Module mappings

Web site Directory Specific how to configure the most simple, specifically do not explain, you can create a new a.php in the Site directory, enter the code

< span="">();

Operation Result:

http://www.bkjia.com/PHPjc/626642.html www.bkjia.com true http://www.bkjia.com/PHPjc/626642.html techarticle recently in contact with PHP this piece, about the PHP configuration under the Wndows system, although the online has a lot of articles, but sometimes some configuration to find trouble, so share to everyone. First, PHP 5.4 ....

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.