PHP Debugging Environment

Source: Internet
Author: User
Tags php and mysql
Applies To: Microsoft Windows XP SP2 (IIS 5.1)

Summary: This tutorial illustrates if you install the latest version of PHP and MySQL in XP SP2 (IIS5.1).

Before installing in a Windows environment, make sure you have installed the latest service patches for the operating system on the machine, and then you should download all the latest PHP and MySQL installation files to a temporary directory with sufficient space, and finally make sure that IIS 5.1 is already installed on the machine.

Download: PHP 5.1.4 Zip Package

Download: Mysql-5.0.22-win32.zip

Download: Php_5.1.4_mysql_5.0.22-win32.zip

First, install PHP

1, in C: New folder PHP, the download back of the PHP 5.1.4 Zip package All extracted to this folder;

2, in any temporary folder, decompression Php_5.1.4_mysql_5.0.22-win32.zip, get two files Php_mysql.dll and Libmysql.dll;

3, Mobile Php_mysql.dll to the C:\PHP\ext\ folder;

4, Mobile Libmysql.dll to the C:\PHP\ folder;

5, find the Php.ini-dist file under the C:\PHP\ folder, rename it to php.ini after the file is opened;

6. Find the following in php.ini file: Extension_dir = "./" (Note: This line specifies the location of the PHP lookup extension), edit the line as follows: Extension_dir = "C:\PHP\ext\" (Note: Do not ignore the last slash);

7. Locate the following line in the php.ini file:; Extension=php_mysql.dll (note: The semicolon at the beginning of the line instructs PHP to ignore the line), delete the semicolon at the beginning of the line to enable the extended extension=php_mysql.dll;

8, save and close the php.ini file;

9, copy the modified php.ini file to the C:\Windows\ folder;

10. Locate the file named Libmysql.dll under the C:\PHP\ folder and copy it to the C:\windows\System32 folder (Note: IIS handles PHP 5 and MySQL requires the file).

At this point, PHP installation is complete.

Second, test PHP installation

1, in the C:\Inetpub\wwwroot\ folder under the new folder PHP;

2. Open Internet Information Services (IIS) Manager in the Administrative tools, or enter "inetmgr" (excluding quotation marks) in the Run dialog box.

3. Find PHP under the default Web site, right-click on the PHP folder, select Properties, click create → configure on the Contents tab, and open the Application Configuration dialog box.

4. On the Mappings tab, click Add, open the Add/Edit Application Extension Mapping dialog box, click Browse After executable, navigate to C:\PHP\php5isapi.dll, and enter ". PHP" in the text box after "extension" ( Note: Be sure to note the period before the extension) and click OK.

5. Click OK, exit the Application Configuration dialog box, click OK, and exit the PHP Properties dialog box.

This completes the IIS configuration.

Third, test the installation of PHP

1. Under C:\Inetpbu\wwwroot\php\, open the new Notepad file and enter the following code:

Phpinfo ();
?>

Save the Segment code as version.php (the suffix must be PHP).

2, open the browser, enter the localhost/php/version.php in the address bar, if the display is normal, then PHP installation is successful.

  • 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.