Win2003 iis+php+mysql+zend Configuration steps detailed 1th/2 page _php tips

Source: Internet
Author: User
Tags install php memory usage phpinfo phpmyadmin zend
First, the 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 in 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 the 2.9.2 version to http://www1.skycn.com/soft/17470.html.

Second, the installation of software

1. Extract the resulting PHP compressed package file into the D:\PHP\PHP5 directory

2. Define the Windows system path environment variable, in My Computer-> properties-> Advanced-> environment variable-> system variable-> find path this variable, click Edit, add a path to install PHP after it, such as D:\PHP\PHP5, Notice that there is a ";" between each variable. Half-angle semicolon-delimited, if the front is not a semicolon manually plus go. Then determine.
If you do not use the method of configuring environment variables, you can use the copy. dll file to the system directory to have the same effect. Copy the files for all the. dll suffixes under D:\PHP\PHP5 to the C:\Windows\system32 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. Php.ini-recommended is recommended because 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 safest settings, this is the best way to do it, although PHP is also safe under the default configuration.
First rename the D:\PHP\php5\php.ini-recommended to php.ini. Then use Notepad to open php.ini:
Register_globals = off Change off to ON (there are two) Here you can generally solve the problem of running the Forum installation blank.
Short_open_tag = off change off to on.
Extension_dir = "./" changed to Extension_dir = "D:\php\php5\ext" (specifies the directory of the Dynamic Connection library, PHP5 and PHP4 the difference is that its dynamic connection library directory has changed, which It has a detailed description of its document structure.
Extension=php_mbstring.dll This is not a choice, with phpMyAdmin will appear red hint
Extension=php_dba.dll
Extension=php_dbase.dll
Extension=php_gd2.dll Support GD Library, the general to drop
Extension=php_imap.dll Optional
Extension=php_ldap.dll
Extension=php_mysql.dll support for MySQL

Next, some file uploads and maximum memory usage restrictions are modified:
Memory_limit = 20M script runs the maximum amount of memory consumed
Post_max_size = 20M Flash capacity
Upload_max_filesize = 20M Attachment capacity
Max_input_time = 60 This is the time each script can consume, and the unit is also seconds
Max_execution_time = 30 This is the maximum time for each script to be run, can be modified by itself lengthened, unit seconds

Upload_tmp_dir upload files to store the temporary path, such as: D:\php\tmp\upload_tmp
Session.save_path cached file path, such as: D:\php\tmp\session_save
4. Make php.ini available under Windows

My Computer-> Properties-> Advanced-> environment variable-> system variable-> Click "Add"-> variable name "PHPRC"-> variable Value "D:\PHP" That's where you install the PHP path.

5. Configure IIS so that it supports PHP.

Install IIS6 correctly in the Add/Remove Programs in the Control Panel.
PHP supports CGI and ISAPI two installation modes, CGI consumes more resources and is easily timed out but not reflected, but is actually safe, load-capable, resource-saving, but less secure than CGI, and I recommend using ISAPI mode. So here's the only way to explain the ISAPI mode installation method:

In the "You need to support PHP Web site" such as the "Default Web Site" Right-click on the Select "Properties", in the open Web Site Properties home Directory tab, edit or add PHP extension mappings or remove the PHP extension mappings from the site you need to support PHP. Executable "adds the Php5isapi.dll under the D:\PHP\PHP5 directory, with the extension. php. The action is limited to "get,head,post,trace" and a suffix of the ISAPI extension named. PHP3 is added, and other settings are extended with. php.

Then open the document tab of the Site Properties window, locate and click the Add button to add the index.php entry to the default Web site startup document list. You can raise the index.php to the highest priority so that the index.php document is automatically searched and opened first when you visit the site.

To determine the application settings and execution permissions for the Web directory, select as pure script, and then close Internet Information Services Manager
For 2003 systems, you also need to add an ISAPI with the. php extension to the Web service extension to the left of Internet services Manager, set the path to D:\php\php5\php5isapi.dll, set the state to allow, active Server Pages Allow.

After the installation is complete, reboot the server, and then create a new text file in the IIS root directory to save as php.php, as follows:

<?php
Phpinfo ();
?>




Open the browser, enter: http://localhost/php.php, will display the current server support PHP all the information, you can see the Server API mode is: ISAPI

Third, the installation of MySQL

Directly in the MySQL official download the MySQL compressed package, decompression Double-click Setup.exe installation, next next step Select Custom installation, then next next to select the installation path here we choose D:\MySQL, continue next next skip Sign Up completes the installation.

When the installation is complete, you are prompted to configure it immediately, and you can choose to configure it. Of course, after the general installation of the menu also has a configuration wizard MySQL Server Instance Config Wizar, after running the following steps to configure and set the root password next next step to select Standard Configuration,next Next, Hook selection include ... Path,next Next, set the root password, suggested that the community set complex point, to ensure that the server security! After the apply completes, the My.ini configuration file is generated in the D:\MySQL directory and the MySQL service is added and started.

Iv. installation of Zend Optimizer
After downloading to get Zendoptimizer, directly double click installs, the installation process wants you to select the Web server, select IIS, and then prompt you whether to restart the Web server, select Yes, before completing the installation prompts whether to back up the php.ini, the point determines after the installation completes. I'm installing it to D:\php\Zend.

The Zend Optimizer Installation Wizard automatically modifies the php.ini to help you start the engine based on your selections. The following is a brief introduction to the configuration options for Zend Optimizer. The following is the default configuration code in the php.ini after the installation is complete (comments after the semicolon):
Zend_extension_ts= "D:\php\Zend\lib\ZendExtensionManager.dll"
; Zend the installation path of the Optimizer module on the hard disk.
Zend_extension_manager.optimizer_ts= "D:\php\Zend\lib\Optimizer-2.6.2"
The directory of the optimizer, which is not required to be modified by default.
zend_optimizer.optimization_level=1023
; optimization, where you define how many optimizations to start, the default value is 15, which means that you open 1-4 of the 10 optimization processes at the same time, we can change this value to 1023, which means that all 10 optimizations are turned on.

When the Phpinfo () function is invoked, 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 the Zend Technologies with Zend Optimizer v2.6.2, the Copyright (c) 1998-2006, by Zend Technologies indicates that the installation was successful.
current 1/2 page   1 2 Next read the full text
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.