Home  >  Article  >  Backend Development  >  Detailed explanation of IIS+PHP+MySQL+Zend configuration steps under Win2003 Page 1/2_PHP Tutorial

Detailed explanation of IIS+PHP+MySQL+Zend configuration steps under Win2003 Page 1/2_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 15:55:21944browse

1. Acquisition of software

1.php First go to http://www.php.net/downloads.php to download the latest PHP 5.2.0 version.

2. MySQL can be downloaded to the latest 5.0.xx version at http://dev.mysql.com/downloads/mysql/5.0.html#downloads.

3.Zend Optimizer can go to http://www.zend.com/free_download/optimizer to download the latest 3.X.X version.

4.phpmyadmin can download version 2.9.2 from http://www1.skycn.com/soft/17470.html.

2. Software installation

1. Unzip the obtained php compressed package file to the D:phpphp5 directory

2. Define the Windows system path environment variable, in my Computer->Properties->Advanced->Environment Variables->System Variables-> Find the path variable, click Edit, and add the path to install php after it, such as D:phpphp5. Pay attention to the space between each variable. There is a ";" half-width semicolon to separate them. If there is no semicolon in front, add it manually. Then OK.
If you do not use the method of configuring environment variables, you can copy the .dll file to the system directory, which will have the same effect. Copy all .dll suffix files under D:phpphp5 to the C:Windowssystem32 directory.

3. Set up a valid configuration file for PHP, php.ini.
There are two ini files in the ZIP package, php.ini-dist and php.ini-recommended. It is recommended to use php.ini-recommended as performance and security are optimized in this file. Because it is modified from php.ini-dist, it will have a greater impact on the settings. For example, set display_errors to off and magic_quotes_gpc to off. If you want the most secure setup, this is the best approach, although PHP is also very secure in its default configuration.
First rename D:PHPphp5php.ini-recommended to php.ini. Then use Notepad to open php.ini:
register_globals = Off Change off to On (there are two places) This can generally solve the problem of blanks when running the forum installation.
short_open_tag = Off Change off to On.
extension_dir = "./" Change to extension_dir = "D:phpphp5ext" (Specify the directory of the dynamic link library. The difference between php5 and php4 is that its dynamic link library directory has changed. This is reflected in its document structure. Detailed instructions)
extension=php_mbstring.dll If you do not select this, a red prompt will appear when using phpMyAdmin
extension=php_dba.dll
extension=php_dbase.dll
extension=php_gd2.dll Support GD library , generally require
extension=php_imap.dll optional
extension=php_ldap.dll
extension=php_mysql.dll Support MySQL

Next, some file uploads and maximum memory usage were modified Limitations:
memory_limit = 20M Maximum memory capacity consumed by script running
post_max_size = 20M Flash memory capacity
upload_max_filesize = 20M Attachment capacity
max_input_time = 60 This is the time that each script can consume, the unit is also seconds
max_execution_time = 30 This is the maximum time for each script to run. You can modify and lengthen it by yourself, in seconds

upload_tmp_dir Temporary path for storing uploaded files, such as: D:phptmpupload_tmp
s session.save_path cache File path, such as: D:phptmpsession_save
4. Make php.ini available under windows

My Computer->Properties->Advanced->Environment Variables->System Variables- >Click "Add"->Variable name "PHPRC"->Variable value "D:PHP;" is the path where you installed PHP.

5. Configure IIS to support php.

Install IIS6 correctly in Control Panel>Add/Remove Programs.
PHP supports two installation modes: CGI and ISAPI. CGI consumes more resources and is prone to not being reflected due to timeouts. However, it is actually safer, has strong load capacity, and saves resources. However, the security is slightly worse than CGI. I recommend using ISAPI. model. Therefore, here we only introduce the ISAPI mode installation method:

Right-click on "Web site you need to support PHP" such as "Default Web site" and select "Properties", then open the "Web site properties" "Home Directory" tab, edit or add PHP extension mapping or delete the PHP extension mapping in the site you need to support PHP. In "Executable File" add php5isapi.dll in the D:phpphp5 directory. The extension is .php. The action is limited to "GET, HEAD, POST, TRACE", and an isapi extension with the suffix name .php3 is added. Other settings are the same as the .php extension.

Open the "Documents" tab of the "Site Properties" window, find and click the "Add" button, and 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 file will be automatically found and opened first when accessing the site.

Make sure that the application settings and execution permissions of the Web directory are selected as pure script, and then close the Internet Information Service Manager
For 2003 systems, you also need to click "WEB Service Extension" on the left side of "Internet Service Manager" "Add an isapi with .php as the extension, set the path to D:phpphp5php5isapi.dll, set the status to allow, and Active Server Pages allow.

After the installation is complete, restart the server, and then create a new text file in the IIS root directory and save it as php.php with the following content:

phpinfo();
?>




Open the browser and enter: http://localhost/php.php. All information about PHP supported by the current server will be displayed. You can see The mode to Server API is: ISAPI

3. Install MySQL

After downloading the mysql compressed package directly from the official MySQL, unzip it and double-click setup.exe to install it. Next, select Custom after the next step. Install, then Next step to select the installation path. Here we choose D:MySQL, continue to Next step and Skip Sign UP to complete the installation.

After the installation is completed, you will be prompted whether you want to configure it immediately. Select Yes to configure it. Of course, there is also a configuration wizard MySQL Server Instance Config Wizard in the menu after installation. After running, follow the steps below to configure and set the ROOT password. Next, select Standard Configuration, Next, and check Include.. PATH, Next. Set the ROOT password. It is recommended that the community set it more complicated to ensure the security of the server! After Apply is completed, the MY.INI configuration file will be generated in the D:MySQL directory, and the MySQL service will be added and started.

4. Install Zend Optimizer
After downloading, you will get ZendOptimizer. Just double-click to install it. When the installation process asks you to select Web Server, select IIS, and then prompt you whether to Restart Web Server. Select Yes to complete the installation. It was previously prompted whether to back up php.ini. Click OK to complete the installation. I installed it here in D:phpZend

The installation wizard of Zend Optimizer will automatically modify php.ini according to your selection to help you start this engine. The following is a brief introduction to the configuration options of Zend Optimizer. The following is the default configuration code in php.ini after I completed the installation (the content after the semicolon is a comment):
zend_extension_ts="D:phpZendlibZendExtensionManager.dll"
;The installation path of the Zend Optimizer module on the hard disk.
zend_extension_manager.optimizer_ts="D:phpZendlibOptimizer-2.6.2"
;The directory where the optimizer is located does not need to be modified by default.
zend_optimizer.optimization_level=1023
; Optimization level, here defines how many optimization processes are started. The default value is 15, which means 1-4 of the 10 optimization processes are enabled at the same time. We can change this value to 1023. Indicates that all 10 optimization processes are enabled.

After calling the phpinfo() function, it displays:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Extension Manager v1.0.9, Copyright (c) 2003-2006, by Zend Technologies with Zend Optimizer v2.6.2, Copyright (c) 1998-2006, by Zend Technologies means the installation is successful.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318315.htmlTechArticle1. Obtaining the software 1.php First go to http://www.php.net/downloads.php to download The latest PHP5.2.0 version. 2.MySQL can be downloaded at http://dev.mysql.com/downloads/mysql/5.0.html#downloads...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn