PHP installation overview

Source: Internet
Author: User

IIS + PHP + MySQL + Zend optimizer + GD library + phpMyAdmin installation configuration in Windows 2000/XP/2003

I. Software preparation: The following are official versions
PHP (5.0.4): http://cn.php.net/get/php-5.0.4-Win32.zip/from/a/mirror
MySQL (4.1.11): http://www.skycn.com/soft/1262.html
Http://dev.mysql.com/downloads/mysql/4.1.html
Zend
Optimizer (2.5.7): http://www.zend.com/store/free_download.php? PID = 13
PhpMyAdmin (2.6.2): http://www.skycn.com/soft/10687.html
Http://www.crsky.com/SoftView/SoftView_4190.html
Suppose c :\
If your current operating system is not installed in c: \, modify it on your own.
Ii. install PHP
:
(1), download to get the php-5.0.4-Win32.zip
, Decompress the package to c: \ Inetpub \ PHP (this path can be used at will, but modify it if this path is used below );
(2) re-run the c: \ Inetpub \ PHP Directory to all the DLL files (mainly c: \ Inetpub \ php c: \ Inetpub \ PHP \ ext DLL file) copy to c: \ windows \ system32, overwrite the existing DLL file;
(3) copy the php.exe‑php-win.exe and PHP. ini-Dist files under the c: \ PHP Directory to C: \ WINDOWS
(C: \ WINNT in Windows 2000;
Change c: \ windows \ PHP. ini-Dist to PhP. ini, open it in notepad, and search by using the search function of notepad.
Register_globals
= Off
, Change off to on;
Search again
Extension_dir =
And direct the path to
Extensions directory, such as: extension_dir = "C: \ Inetpub \ PHP \ Ext"
;
Search found
Windows
Extensions
List
; Extension = php_dbase.dll
Optional
; Extension = php_gd2.dll
This is used to support the GD library. It is generally required.
; Extension = php_ldap.dll
Optional
; Extension = php_mbstring.dll
If you do not select phpMyAdmin, a red prompt is displayed. Therefore, it is required.
; Extension = php_mssql.dll
This is used to support MSSQL. Optional.
; Extension = php_mysql.dll
This is used to support mysql. It is required to support MySQL.
Remove the previous ";". You can also remove the previous one if you need it. Then, close and save the file.

(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:
Open your browser and enter http: // localhost/. Then, you can view the successful page and perform the following operations:
PHP supports CGI and ISAPI
ISAPI is recommended for two installation modes. Here we will only describe how to install ISAPI: ISAPI
Mode installation steps:
In "Control Panel", select "Internet Service Manager" in "Administrative Tools" to open IIS
And then stop the service. Then, right-click the "web site that you need to support PHP" on the left, for example, "Default web site", and choose "properties ", in the "website properties" window, click "ISAPI"
Find the Filter tab and click "add". In the "Filter Properties" window that appears, enter "php" in the "Filter Name" column, and then point the executable file to php5isapi. dll.
Path, for example, C: \ Inetpub \ PHP \ php5isapi. dll.
Open "Web
Click the "main directory" tab in the "site properties" window and click "Configure ". Program In the Configuration window, find and click Add. In the displayed window, add a new extension ing with the extension
. Php, Click Browse to point the executable file to php5isapi. dll
Path, for example, C: \ Inetpub \ PHP \ php5isapi. dll, and click OK. If you want to support PHP extensions such as. php3 and. phtml
File, you can repeat the "add" step.
Open the "document" tab in the "web site properties" window, find and click "add" to add the following to the default web site startup document list.
Index. php item. 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.
OK
Select "Pure script" for the application settings and execution permission in the web directory, disable the Internet Information Service Manager, and execute the following command at the command prompt:
Net stop
W3svc
Net stop IISADMIN
Net start w3svc
Then
ISAPI extensions are allowed in "Web service extensions" on the left of the Service Manager, while Active Server Pages allow
Open the browser and enter: http: // localhost/. After the successful page is displayed
Create a phpinfo. php file in the root directory.
, The content is as follows:
Open your browser and enter: http: // localhost/phpinfo. php. All the PHP information supported by the current server is displayed.
The API mode is ISAPI.
3. Install MYSQL:

If you download windows essentials (x86), you will get the mysql-4.1.11-essential-win.exe
, Double-click to install it. Install c: \ Inetpub \ mysql here. During the installation process, you will be prompted if you want to configure it immediately. Select No to complete the installation. After the installation is complete, enter c: \ Inetpub \ mysql \ bin \ mysqld-nt in "run" in the "Start" menu.
-Install. After running successfully, enter "net MySQL start" to start the MySQL service. If you want to configure MySql in detail, enter
C: \ Inetpub \ mysql \ bin directory. Run mysqlinstanceconfig.exe and follow the prompts.

If you download windows (x86), unzip the package and double-click to execute setup.exe. The steps are the same as above.

If you download without Installer (unzip in c: \), decompress it to c: \ Inetpub \ mysql, and enter:
C: \ Inetpub \ mysql \ bin \ mysqld-nt.exe, run successfully and then input: Net MySQL start, you can start MySQL
Service.
Set a password for MySQL to ensure security:
The general menu contains the Configuration Wizard MySQL server instance config
Run the command and follow the steps below to configure the root password.
Root Password. We recommend that you set complexity to ensure server security!
You can also
Use commands to configure the command line client:
First, open the DOS window, enter the directory mysqlbin, and then type the command mysql-uroot
-P: After you press enter, the system prompts you to lose the password. If you have just installed MySQL, the Super User Root has no password, so press enter to enter mysql. The MySQL prompt is: mysql>
Change the password.
Format: mysqladmin-u username-P old Password New Password
For example, add a password for the root user, xqin.com, and enter mysqlbin in the DOS directory, and then enter the following command:
Mysqladmin-uroot
-Password xqin.com
Note: because the root account does not have a password at the beginning, the old-P password can be omitted.
Then execute:
Set
Password for 'root' @ 'localhost' = old_password ('xqin. com ');
The command here is because MySQL 4.1
Password hash used by the verification protocol and its later versions Algorithm Incompatible with the old client, you will also be prompted to log on with the correct password in phpMyAdmin:
Client does not support
Authentication Protocol requested
By server; consider upgrading MySQL
Client
This is to prepare for the correct use of phpMyAdmin.
In this way, the root password is set to xqin.com.
4. Install Zend optimizer:
Download
ZendOptimizer-2.5.7-Windows-i386.exe, directly double-click the installation, installation process requires you to select Web server, select IIS
Then, you will be prompted whether to restart the Web server. If yes is selected, you will be prompted whether to back up PHP. ini before the installation is complete.
Click OK to complete the installation. NOTE: If your PHP version is 4.3 or later, do not use the default installation. Instead, use the custom installation method and select the PHP version as PHP.
4.3.x. Otherwise, the version is not supported.
Install it in c: \ Inetpub \ Zend
Zend
The Installation Wizard of optimizer automatically modifies PHP. ini based on your selection to help you start this engine. The following is a brief introduction to Zend optimizer.
Configuration options. PHP. ini after installation is complete
Default Configuration inCode (The content following the semicolon is a comment ):
Zend_extension_ts = "C: \ Inetpub \ Zend \ Lib \ zendextensionmanager. dll"
; Zend
Optimizer
The installation path of the module on the hard disk.
Zend_extension_manager.optimizer_ts = "C: \ Inetpub \ Zend \ Lib \ Optimizer-2.5.7"
; Optimizer Directory, which does not need to be modified by default.
Zend_optimizer.optimization_level = 15
; Degree of optimization, which defines how many optimization processes are started. The default value is
15, indicating that 1-4 in 10 optimization processes are enabled at the same time. We can change this value to 1023.
To enable all 10 optimization processes.
After the phpinfo () function is called, the following information is displayed:
Zend engine v1.3.0, copyright (c)
1998-2002 Zend technologies with Zend optimize
R v2.1.0, copyright (c)
1998-2003. By Zend technologies, the installation is successful.
Install the GD library
This step has been installed in the previous PHP. ini configuration ~
In PHP. ini, find
"Extension_dir", and then point the path to extension, as shown below (assuming that your PHP installation path
Path: C: \ Inetpub \ PHP, set extension_dir =
"C: \ Inetpub \ PHP \ Ext", after completing this step. in INI, find the line "extension = php_gd2.dll" and remove the semicolon. After the GD library is installed, use echophpinfo () to test whether it is successful!
5. Install phpMyAdmin:
Download To get phpMyAdmin-2.6.0.zip
, Decompress it to the IIS root directory, find and open config. Inc. php
, Make the following changes:
Search for $ cfg ['pmaabsoluteuri '] and set your phpMyAdmin URL, for example, $ cfg ['pmaabsoluteuri'].
= 'HTTP: // localhost/PHPmyAdmin /';
Note that phpMyAdmin is in the root directory of the default site.
Search for $ cfg ['blowfish _ secret ']. After setting the root password, enter the root password, for example, xqin.com, and set it to $ cfg ['blowfish _ secret'].
= 'Xqin. com ';
Search for $ cfg ['defaultlang '] and set it to zh-gb2312
;
Search for $ cfg ['defaultcharset'] and set it to gb2312.
;
Search for $ cfg ['servers'] [$ I] ['auth _ type']. The default value is config. It is insecure and is not recommended. Cookie is recommended, set it to $ cfg ['servers'] [$ I] ['auth _ type']
= 'Cookies ';
Note that if config is set here, set the user name and password below! For example:
$ Cfg ['servers'] [$ I] ['user']
= 'Root'; // MySQL
User ----- MySQL connection user
$ Cfg ['servers'] [$ I] ['Password'] =
'Xqin. com ';
My configuration file is for reference only!
Http://xqin.com/iis/config.inc.txt
Open the browser and enter: http: // localhost/PHPmyAdmin/. If IIS and MySQL
All started. Enter the root password xqin.com to view the database content.
Please familiarize yourself with the specific functions of phpMyAdmin.
So far, all installation is complete.

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.