Configuration of IIS 7.0 + PHP + Mysql in 64-bit Windows

Source: Internet
Author: User
Tags http authentication

This article introduces how to configure IIS 7.0 + PHP + Mysql in 64-bit Windows, if you are using iis7 and need to run php, you can load a php program using iis to run the php program in iis.

 

I. PHP installation

1. decompress the downloaded PHP package to a directory (as you like), for example, F:/php

2. Rename php. ini-dist to php. ini, and copy it to the C:/windows directory.

3. Open php. ini in a notebook, first find extension_dir, and write it into the extension directory address in the double quotation marks. In this example, F: phpext

4. Search extension = php_curl.dll, extension = php_dbase.dll, extension = php_gd2.dll, extension = php_ldap.dll, extension = plugin, extension = plugin, extension = php_mysql.dll, and put them in front of them) all removed, save and exit

5. Put libmysql in the PHP folder. dll and libmcrypt. copy the dll to the C:/windows Directory (not C:/windows/system32). This step is required, when I reuse mysql, there will be a situation where "mysql extension cannot be loaded" (I found this problem when I tested phpmyadmin again, and Baidu solved it for a long time, then the PHP configuration is complete. (Important)

PS: Some people say they want to put all the files in the php folder and the ext folder in the php folder. all dll files are copied to the c:/windows/system32 folder. If you cannot display the php page after completing all the operations, try again.

2. IIS 7.0 Configuration

In 1 windows, the IIS function is disabled by default, so you must manually enable it. You can open the control panel and click "uninstall program". Then, click "open or close windows". In the displayed dialog box, select all the items in IIS,

 

Note that you need to open the plus signs before selecting the check box, otherwise it will not be selected. In addition, if you do not need the FTP service, you can leave it unselected.

Then, click OK to open the service.

2. After the IIS function is enabled, right-click the computer and Click Manage. IIS is displayed in the service and application. Double-click to open IIS.

Right-click the application pool, select Add application pool, and enter the name PHP ,. net framwork select unmanaged code, managed pipeline mode select classic, click OK, then select PHP In the application pool, click Advanced Settings,

 

Change "enable 32-bit application" to "true" (if it is a 64-bit system, this is a required change. I didn't change it at the beginning, so the page cannot be displayed until now ...)

3. Select the local

 

Then, the ISAPI filter is suspended. Click Add. Set the Filter Name to PHP. Select php5isapi. dll as the executable file. In this example, select F:/php/php5isapi. dll. Click OK.

4. Select "handler ing", click "add script ing", and enter the Request Path *. php: Select php5isapi for the executable file. dll, in this example, the median F:/php/php5isapi. dll, named PHP, click OK.

5. Click directory browsing and click Enable.

6. Click the default document to add index. php.

7. Select a website. In this example, select local. Click Advanced Settings.

Change the application pool to PHP. In addition, set the physical address to the root directory of your website.

8 so far, IIS has been set up, now you can test, create a text, content bit

<? Php

Phpinfo ();

?>

Save and rename it index. php

Open the browser and enter http: // localhost/

Three ZendOptimizer installation (optional)

This is very simple. After double-clicking the installation package, select the php Directory and website directory as prompted.

4. Install mysql

1. Double-click the installation package and follow the next step to complete installation.

2. A dialog box is displayed after the installation is complete.

Click finish to go to the settings page.

2. After Entering the settings screen ()

 

Click next.

 

Select standard configuration and click next.

 

Here is the mysql password. Set one according to your hobbies and click next.

Click next.

Click execute.

Click finish to complete the mysql settings.

PS: I don't know why I already have a mysql service when I re-install it. I stopped the "start service" option. As a result, I found a solution after Baidu, that is, to delete the original service by opening cmd and entering

The Code is as follows: Copy code

C:> SC delete mysql

You can delete a service.

Now you can test mysql. Click start to open MySQL Command Line Client.

Enter the logon password. If the logon password is displayed, the setting is successful.

5. Install phpmyadmin

1. decompress the files in the compressed package to any location in the website directory. In this example, the position f:/web/phpmyadmin (where web is the root directory of the website, decompress all files to the phpmyadmin folder)

2. Because phpmyadmin 3.1.0 and later versions have different settings, note that the configuration file is changed to config in f:/web/phpmyadmin/libraries. default. php, rename the file to config. inc. php, copy to the phpmyadmin directory, open the file in the notebook mode, and set it as described below

The Code is as follows: Copy code

$ Cfg ['pmaabsoluteuri '] = ""; // enter the phpMyAdmin address (http: // localhost/phpmyadmin in this example)

$ Cfg ['pmaabsoluteuri _ DisableWarning '] = FALSE;

$ Cfg ['pmanorelation _ DisableWarning '] = FALSE;

$ Cfg ['blowfish _ secret '] = 'sdafasdf'; // use the encryption disturbance during cookie verification. You can enter the parameter at will.

$ Cfg ['servers'] [$ I] ['auth _ type'] = cookie; which of the following authentication methods can be used by the system? (config, http, cookie)

Config does not require authentication based on the configuration file. You only need to access phpMyAdmin to perform the operation. This is the most dangerous. It is never recommended unless you test it locally;

Http access through HTTP authentication is safer, that is, entering the user name and password in the pop-up window and then accessing;

It is safe to use cookies for verification. We recommend that you use this.

The Code is as follows: Copy code

$ Cfg ['servers'] [$ I] ['user'] = ''; // MySQL Username

$ Cfg ['servers'] [$ I] ['Password'] = ''; // MySQL password. If you use cookie, leave it empty.

After entering the information, save and exit. Enter http: // localhost/phpmyadmin in the browser. after entering the password, you can manage mysql.

So far, all the settings have been completed. I hope my experience on this day will be helpful to you...

Summary: In this setting, three major problems were encountered: the first problem was that the 32-bit application was not changed to true When IIS was set up. After half a day, the php page still could not be displayed; the second is that, during the mysql setup process, I don't know why I already had a mysql service, and I couldn't start mysql. The third one is also a problem that caused me the longest time, when you open phpmyadmin, the "unable to load mysql extension" pop up. Fortunately, the solution is still found to put libmysql in the PHP folder. dll and libmcrypt. copy dll to C:/windows.

Related Article

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.