IIS + PHP + MySQL Configuration

Source: Internet
Author: User
Tags php website
I found many methods for configuring IIS + PHP on the Internet. After I tried it, many methods won't work. So after summing up most of the articles, we came up with this method: (this operating system uses Win2000 as an example. If you want to change it to another system, you can change the system root directory to OK)
1. Download required programs:
(1) download a PHP file from the official PHP website (this document uses PHP 4.4.2 as an example ). URL: http://cn.php.net/downloads.php;
(2) download a Zend optimizer from the official Zend website (this article uses Zend 2.6.2 as an example ). URL: http://downloads.zend.com/optimizer /;
(3) Since you want to install PHP of course on the installation of MySQL (this MySQL 3.23.49 for example), to the official website to download a, the URL is as follows: http://www.mysql.com;
(4) download a tool to facilitate MySQL management. You can get twice the result with half the effort, as shown in the following code: http://www.dnsing.com/upfiles/phpmyadmin.rar;
Ii. Formal Configuration:
(1) decompress all the downloaded packages, first decompress the PHP package to C:/PHP on drive C, and then extract the "php4ts. copy "DLL" to "C:/winnt/system32/" and put "php4isapi" under the C:/PHP/SAPI/directory. copy DLL to "C:/winnt/system32/", and then copy all * in the C:/PHP/DLLs/directory *. copy all DLL files to the "C:/winnt/system32/" Directory (if the original file is backed up before overwriting), then copy C: /"php. change ini-Dist to "php. ini "to the C:/WINNT directory, and then open the extension_dir = ". /"extension_dir =" C:/PHP/EXT "and save the modification;
(2) Go to the management tool of the control panel and find "Internet Service Manager" (IIS). Then, perform the operations in sequence, right-click the default site and choose Properties> Home directory> Configuration> application ing> Add. Then, enter C: /winnt/system32/php4isapi. DLL, extension input. PHP (there is a point ". ")-> then click ISAPI filter-> Add-> enter php In the Filter Name (this does not have a". "), enter C:/winnt/system32/php4isapi In the executable file. after DLL is configured, it will exit IIS;

(3) then, in the Start Menu, enter net stop IISADMIN to stop IIS first. The directory is to restart IIS to make the configuration take effect, finally, enter Net start w3svc at the runtime to restart the IIS service. So far, IIS + PHP is basically configured. The following work is to install Zend and a MySQL server, but these are not difficult. In this case, open IIS again, and add several file names to the documents of the default site, such as index. php and index. php3.
(4) Now you have to install Zend optimizer. After unzipping the package, it is an installer. You can simply double-click the package to install it. The installation path is the default one, during the installation process, set the root directory of the server. This directory is the same as the main directory pointed to in IIS. Finally, the Zend installer automatically adds its own path to PhP. ini.
(5) After installing the above program, start to install MySQL, And you will unzip it to C:/MySQL, and then open my. INI file, and then set it: (After opening it, you can set it as a comparison. If you add #, you can ignore it first)
The following are the settings:
[Mysqld]
Basedir = C:/MySQL
# Bind-address = 192.168.0.1
Datadir = C:/mysqll/Data
# Language = C:/MySQL/share/your language directory
# Slow query log # =
# Tmpdir # =
# Port = 3306
# Set-variable = key_buffer = 16 m
[Winmysqladmin]
Server = C:/MySQL/bin/mysqld-nt.exe
# The user is the administrator username, which must be modified by yourself.
User = root
# Password
Password = www.dnsing.com

After the settings are complete, copy the file to the "C:/winnt" directory, click Run in the Start menu, and Enter cmd-> Cd C: /MySQL/bin-> mysqld-nt.exe-install
After the installation is complete, a prompt will be displayed, and then enter: Net start MySQL to start the MySQL service;
(6) As of now, all configurations have been completed. Restart IIS to test whether the configuration is successful. The restart command is first: net stop IISADMIN and then Net start w3svc
The following is the test. php program, which is saved in the root directory of IIS.
The following is a code snippet:
<? PHP
Echo "Hello world! ";
?>
Enter http: // localhost/test. php In the browser. If you can see helloworld! Congratulations! Configuration successful. If not, try entering http: // 127.0.0.1/test. PHP. If the problem persists, it indicates that your hosts file is faulty. Edit the hosts file under C:/winnt/system32/Drivers/etc and add the "127.0.0.1 localhost" line. In the end, we still cannot. You should study this article again to find out whether any steps are missing or not completed.
Thank you for reading. The above configuration is all done after my successful configuration. I believe you can also configure it successfully. Now you can start your PHP journey!

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.