IIS + PHP + MySQL + Zend Optimizer + GD library + phpMyAdmin installation and configuration [complete revision of Community edition] Page 1/2

Source: Internet
Author: User
Tags sapi windows x86

IIS + PHP + MySQL + Zend Optimizer + GD library + phpMyAdmin installation configuration [complete revision of Ultimate Edition]

I. Software preparation: The following are the latest official versions as of March 20, and are also valid for a long time.
1. For PHP, we recommend that you decompress the PHP 4.4.0 ZIP file:

PHP (4.4.0 ):Http://cn.php.net/get/php-4.4.0-Win32.zip/from/a/mirror

PHP (5.1.2 ):Http://cn.php.net/get/php-5.1.2-Win32.zip/from/a/mirror
2. MySQL. We recommend the Windows system installation version of MySQL4.0.26 in combination with PHP4:

MySQL (4.0.26): http://download.discuz.net/mysql-4.0.26-win32.zip

MySQL (4.1.16 ):Http://www.skycn.com/soft/24418.html

MySQL (5.0.18): http://download.discuz.net/mysql-4.0.26-win32.zip

3. Zend Optimizer. Select the latest version:

Zend Optimizer (2.6.2 ):Http://www.zend.com/store/free_download.php? Pid = 13

(Although the Zend software is free to download, You need to register a user. Here we provide the registered account name: xqincom and password: xqin.com for your convenience, please do not modify this account or use this account for other legitimate means of payment. Thank you !)

After login select Windows x86 Platform version, such as the latest version 2.6.2 https://www.zend.com/store/getfreefile.php? Pid = 13 & zbid = 995
4. phpMyAdmin

Select the latest version for Windows:

PhpMyAdmin ( http://www.crsky.com/soft/4190.html
Suppose C: \ is the system disk of your current operating system. If your current operating system is not installed in C: \, modify the corresponding path. At the same time, because the C drive often reinstalls the system for various reasons, it is difficult to store the data on the drive to back up and transfer the selected installation directory, so this article will install all PHP-related software under the D: \ php Directory, you can set this path by yourself. If you install the path involved in different directories, modify the following path.
2. install PHP: Set PHP installation path to D: \ php \ php4 \ in this article (to avoid confusion, set PHP5.1.x installation path to D: \ php \ php5 \)
(1), Download to get the php-4.4.0-Win32.zip, decompressD: \ phpDirectory, will get the Level 2 Directory php-4.4.0-Win32, renamed to php4,
That is, the PHP file storage directory is obtained.D: \ php \ php4 \

If php5.1.2 and php-5.1.2-win32.zip are obtained, press all files directlyD: \ php \ php5Directory to store PHP filesD: \ php \ php5 \];
(2)And then change the D: \ php \ php4 directory and D: \ php \ php4 \ dlls directory.

[If PHP5 is D: \ php \ php5 \], copy all dll filesC: \ Windows \ system32(The win2000 system isC:/winnt/system32/) To overwrite the existing dll file;

(3)Open php. ini-dist in notepad and use the search function of notepad to search for and modify:
Search register_globals = Off

Change Off to On to obtain register_globals = On.

Note: This corresponds to the global variable function of PHP. If many PHP programs require the global variable function, enable it. Note the rigor of the PHP program, if you do not need to search extension_dir =

This is the PHP Extension function directory and points its path to the extensions directory under your PHP Directory, for example:

ModifyExtension_dir = "./"Is extension_dir = "D:/php/php4/extensions /"

[Change PHP5Extension_dir = "D:/php/php5/ext /"] Create a folder in D: \ php and name it tmp

Find upload_tmp_dir =

Replace; upload_tmp_dir the annotator of the row, that is, the semicolon above";"Remove,

This line plays a role in the php. ini document. Upload_tmp_dir is a temporary path used to define the storage of uploaded files. Here you can modify and define an absolute path for it. The directory set here must have read and write permissions.

Here I set it to upload_tmp_dir = D:/php/tmp (that is, the folder created earlier) search; Windows Extensions

;Remove,Red must, Blue for selection
; Extension = php_mbstring.dll

This must be
; Extension = php_curl.dll
; Extension = php_dbase.dll
; Extension = php_gd2.dll
This is used to support the GD library. It is generally required.

; Extension = php_ldap.dll
; Extension = php_zip.dll

You also need to find the PHP5 version.

; Extension = php_mysql.dll

And remove the previous ";"

This is used to support MYSQL. Because PHP5 uses MySQL as an independent module for loading and running, it is required to support MYSQL.
Query; session. save_path =

Remove the front;In this article, set it

Session. save_path = D:/php/tmp you can choose to remove the previous one;

Save the file as php. iniC: \ Windows(C: \ WINNT in Windows 2000). Change the file suffix to ini,

C: \ Windows \ php. ini (C: \ WINNT \ php. ini in Windows 2000)

If the path is the same as this document, you can directly save it to the C: \ Windows (C: \ WINNT in Windows 2000) directory.

Some friends often report that they are unable to upload large files or that some programs often run out of time. You can find PHP in the C: \ Windows (C: \ WINNT in Windows 2000) directory. modify the following content in INI:Max_execution_time = 30This is the maximum running time of each script, which can be modified and extended by yourself, in seconds.
Max_input_time = 60; This is the time that each script can consume, and the Unit is second.
Memory_limit = 8 MThis is the maximum memory consumption for script running. You can increase the memory consumption by yourself.
Upload_max_filesize = 2 M; Upload the maximum file license size. Change it by yourself. This value is required for some image forums.
(4)Configure IIS to support PHP:
First, make sure that IIS is correctly installed in the system. If IIS is not installed, install IIS first. The installation steps are as follows:
IIS installation in Windows 2000/XP:
Log on to the system with the Administrator account, insert the Windows 2000 installation disc into the disc drive, go to "Control Panel", click "Add/delete program", and then click "Add/delete Windows Components" on the left ", in the displayed window, select "Internet Information Service (IIS)", click the "details" button below, and select a component. The following components are required: "Internet Service Manager", "World Wide Web server", and "public files" are installed.
After the installation is complete, open "Service" in "Administrative Tools" on the "control panel" and check "IIS Admin Service" and "World Wide Web Hing Service, if it is not started, start it.
IIS installation in Windows 2003:
Because IIS 2003 of Windows 6.0 is integrated into the application server, IIS 6.0 is installed by default when you install the application server. Click "Configure your server" in the "Start" menu ", in the open "Configure your server wizard", select "Application Server (IIS, ASP. ", click" Next "to display" application server options ". You can select all components installed with the application server. By default, click" Next ", the "select summary" page appears, prompting the options in this installation. The configuration program will automatically install and configure according to the options in "select summary.
Open your browser and enter http: // localhost/. Then, you can view the successful page and perform the following operations:
PHP supports CGI and ISAPI installation modes. CGI consumes more resources and is easy to reflect due to timeout. However, it is actually safer, with a strong load capability and resource saving, but its security is slightly worse than CGI, I recommend using the ISAPI mode. Here, we only describe how to install ISAPI mode: (the window interface may be different for different systems, but the corresponding tab columns are the same. You only need to find the corresponding tab mentioned)
In "Control Panel", select "Internet Service Manager" in "Administrative Tools", enable IIS, and stop the service, for the WIN2000 system in the "Internet Service Manager" subordinate tree, you can right-click your "computer name" and choose "properties ", on the properties page, select "edit" on the right of the "main attribute" WWW service ".

For XP/2003 systems, the "Internet Service Manager" sub-tree is generally your "computer name", select "website", and right-click to select "properties"

In the pop-up Properties window, select the "ISAPI filter" tab and click the "add" button. In the pop-up "Filter Properties" window, enter:
PHP, and then point the path of the browsing executable file to the path of php4isapi. dll,

In this example, D: \ php \ php4 \ sapi \ php4isapi. dll

[PHP5 corresponds to D: \ php \ php5 \ php5isapi. dll]

Open the "home directory" tab in the "site properties" window, and click "Configure ".
In the displayed "application configuration" window, find the "Application ing" tab and click "add" to add an extension ing, in the displayed window, click browse to direct the executable file to php4isapi. dll path, as shown in the following figure: D: \ php \ php4 \ sapi \ php4isapi. dll [PHP5 corresponds to D: \ php \ php5 \ php5isapi. dll], the extension is. php, the action is limited to "GET, HEAD, POST, TRACE", select "Script Engine", "check whether the file exists", and then confirm it all the way. If you want to support PHP files with extensions such as. php3 and. phtml, you can repeat the "add" step to set the corresponding extension to the desired extension, such as. PHPX.
This step will allow all sites under your server's IIS to support your added PHP extension files. Of course, if you only need some sites to support PHP, you only need to right-click "Web sites that support PHP", such as "Default Web sites", and select "properties". On the "Web site properties" "home directory" tab, edit or add the extension ing of PHP, or delete the extension ing of PHP in the site where you need to support PHP.

Open the "documents" tab in the "site properties" window, find and click "add" to add the index. php item to the default Web site startup document list. You can raise index. php to the highest priority, so that the index. php document is automatically searched and opened when you visit the site.

Confirm that the Web directory application is set and the execution license is selected as a pure script, and then close the Internet Information Service Manager.
For the 2003 system, you also need to set the ISAPI extension permission in "WEB Service extension" on the left of "Internet Service Manager". The Active Server Pages allow

After all the operations are completed, restart the IIS service.
Run the following command in the CMD Command Prompt:
Net stop w3svc
Net stop iisadmin
Net start w3svc
By now, the basic PHP installation has been completed, and we have enabled the website to support PHP scripts.
The check method is to create a new text file in the IIS root directory and save it as php. php. The content is as follows:

<? Php
Phpinfo ();

Open your browser and enter http: // localhost/php. php. All the information about PHP supported by the current Server is displayed. The Server API mode is ISAPI.

You can also use the PHP probe to detect the download, decompress it to the root directory of your site, and access it.
3. Install MySQL:
For mysql4.0.26download to mysql-4.0.26-win32.zip, unzip to the mysql-4.0.26-win32 Directory Double-click to execute Setup.exe one way Next, select the installation directory for D: \ php \ MySQL and the installation method for Custom installation, and then one way to Next.

After the installation is complete, enter and run in the CMD command line:
D: \ php \ MySQL \ bin \ mysqld-nt-install

If Service successfully installed is returned, the system Service is successfully installed.

Create a new text file and save it as MY. INI. Edit the configuration MY. INI. Here is a reference configuration.

Basedir = D:/php/MySQL
# MySQL directory
Datadir = D:/php/MySQL/data
# The directory where the MySQL database is located, which can be changed to another directory where your database is stored
# Language = D:/php/MySQL/share/your language directory
# Port = 3306
Set-variable = max_connections = 800
Set-variable = key_buffer = 512 M
Set-variable = max_allowed_packet = 4 M
Set-variable = table_cache = 1024
Set-variable = sort_buffer = 2 M
Set-variable = thread_cache = 64
Set-variable = join_buffer_size = 32 M
Set-variable = record_buffer = 32 M
Set-variable = thread_concurrency = 8
Set-variable = myisam_sort_buffer_size = 64 M
Set-variable = connect_timeout = 10
Set-variable = wait_timeout = 10
Server-id = 1
Set-variable = key_buffer = 128 M
Set-variable = sort_buffer = 128 M
Set-variable = read_buffer = 2 M
Set-variable = write_buffer = 2 M
Set-variable = key_buffer = 128 M
Set-variable = sort_buffer = 128 M
Set-variable = read_buffer = 2 M
Set-variable = write_buffer = 2 M
Server = D:/php/MySQL/bin/mysqld-nt.exe

Save and copy the MY. ini file to the C: \ Windows (C: \ WINNT in Windows 2000) directory.
Return to the CMD command line and enter and run:

Net start mysql

MySQL service is starting.
The MySQL service has been started successfully.

The MySQL service will be started;

Change the ROOT password under DOS: of course, after PHPMYADMIN is installed, you can also change the password through PHPMYADMIN.

Format: mysqladmin-u username-p old password New password

For example, add a password xqin.com to the root user.

First, go to the CMD command line, go to the bin directory under the MYSQL directory, and then type the following command

Mysqladmin-uroot password your password

Note: because the root account does not have a password at the beginning, the old-p password can be omitted.

D: \ php \ MySQL \ bin> mysqladmin-uroot password your password

After you press enter, set the ROOT password to your password.
If you download MySQL5.x or MySQL4.1.x, for example, mysql-5.0.18-win32: unzip and double-click to execute Setup.exe, Next select Custom installation, and then Next select the installation path here we choose D: \ php \ MySQL, continue Next and skip Sign UP to complete installation.
After the installation is complete, you will be prompted if you want to configure it immediately. Select Yes to configure it. Of course, the Configuration Wizard MySQL Server Instance Config Wizar is also available in the menu after installation. After running the command, configure and set the ROOT password following the steps below.

Next, select Standard Configuration.
Next, select Include .. PATH.
Next, set the ROOT password. We recommend that you set the complexity to ensure server security!
After applying is complete, the MY. INI configuration file is generated in the D: \ php \ MySQL directory, and the MySQL service is added and started.

If your MySQL installation fails and the uninstallation and reinstallation still cannot be solved, here is a small Tool System Service Manager available

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.