Introduction
The efficiency of PHP is obvious, this is one of the reasons I like it, and it is called a wonderful partner MySQL and Apache want to merge, cannot but marvel at its efficiency. PHP updates are also very quick, here is the latest version of PHP4.3.2RC4 (almost no bugs, it is estimated that after the end of the formal version of the post), and the latest version of the Mysql4.0.13 installation process.
PHP installation files can be downloaded directly to the http://www.php.net/for Win32. Zip package (5.8M)
MySQL installation files can be downloaded directly to the http://www.mysql.com for Win32. zip package
In addition, if you want to experience the effects of Apache and PHP to give up IIS, please go to http://www.apache.org to download the latest for win31. MSI installation package, currently the latest version is 2.0.45.
In addition, you can download the Zend Optimizer to speed up PHP. Specific access to http://www.zend.com
<1> Installation configuration PHP
1. Unzip the PHP compression package to the c:php (this path can be arbitrary, but the following if you use this path, please modify accordingly).
2. Copy all files in the Php4ts.dll and C:phpdlls directories under the c:php directory into Windows system folders, depending on the version of Windows
If it is a Windows 9x/me c:windowssystem
If it is a Windows nt/2000 c:winntsystem32
If it is a Windows xp/server2003 c:windowssystem32
where C: for the system disk you are using now, if your current operating system is not installed under C:windows, please make changes accordingly.
Copy Php.ini-dist to C:windows (xp/2003/9x/me) or c:winnt (2000/nt) and rename it to PHP.ini. Open with Notepad, modify the information:
Search Extension_dir =./This line and refer its path to the extensions directory in your PHP directory, such as:
Extension_dir = c:phpextensions
If you want to support more modules, please take the following to do, if not, save the php.ini file directly.
PHP supports a lot of modules, but some DLLs are not free, so there is no compression package with PHP release, but the DLLs folder is very much, we have copied them to the System32 folder, and now we test to see how many modules it supports. The following is my test results, for reference only, if the installation is completed, pop-up does not support the Xxx.dll module, the front semicolon plus go on it, search:
; Windows Extensions
; Note that MySQL and ODBC support are now built in, so no DLL are needed for it.
;
below are separated by semicolons in front of the supported extension module, if you want PHP to support a module, please forward the ";" Remove can, the following is my test results, generally follow the following way to remove comments after no problem:
Extension=php_bz2.dll
Extension=php_cpdf.dll
Extension=php_crack.dll
Extension=php_curl.dll
Extension=php_db.dll
Extension=php_dba.dll
Extension=php_dbase.dll
Extension=php_dbx.dll
Extension=php_domxml.dll
Extension=php_exif.dll
Extension=php_fdf.dll
Extension=php_filepro.dll
Extension=php_gd2.dll
Extension=php_gettext.dll
Extension=php_hyperwave.dll
Extension=php_iconv.dll
; Extension=php_ifx.dll
; Extension=php_iisfunc.dll
Extension=php_imap.dll
Extension=php_interbase.dll
Extension=php_java.dll
Extension=php_ldap.dll
Extension=php_mbstring.dll
; Extension=php_mcrypt.dll
Extension=php_mhash.dll
Extension=php_mime_magic.dll
Extension=php_ming.dll
Extension=php_mssql.dll
Extension=php_msql.dll
; Extension=php_oci8.dll
Extension=php_openssl.dll
; Extension=php_oracle.dll
Extension=php_pdf.dll
Extension=php_pgsql.dll
; Extension=php_printer.dll
Extension=php_shmop.dll
Extension=php_snmp.dll
Extension=php_sockets.dll
; Extension=php_sybase_ct.dll
Extension=php_w32api.dll
Extension=php_xmlrpc.dll
Extension=php_xslt.dll
Extension=php_yaz.dll
Extension=php_zip.dll
After the
modification is complete, save the php.ini to complete the installation and configuration of PHP.
Installation of <2>mysql
MySQL is relatively independent, the database is very small, can not directly operate it, unlike access or SQL2000 so intuitive, but there are already a lot of software can be very good operation of it, such as PHPMYADMIN,MYSQLCC. These software can be downloaded to the http://www.mysql.com, which is not described in detail here.
Get MySQL for Win32 install package, open with WinZip, run directly Setup.exe, need to pay attention to select an installation path, of course, the installation path can be arbitrary, but I recommend it and PHP installed together, select the C:mysql directory. MySQL is complete after the installation is complete. As for setting up users and passwords, you can manage them using the two software mentioned above. This does not continue to describe, the default username is root and the password is blank.
After the general installation of MySQL will automatically start the service, if not started, please run C:mysqlbinmysqld-nt.exe
The next installation depends on what you choose to use as your Web server, I suggest using Apache, and if you feel you are in conflict with IIS, use IIS directly.
<3>iis configuration:
Open IIS, right-click on the default Web site, and make the settings in the home directory as shown in the following illustration, and note the steps:
After the completion of the IIS+PHP+MYSQL environment is established.
<4> If you do not have IIS, then we install Apache this small Web server:
We downloaded to the for Win32 is an MSI installation file, directly double-click it will automatically perform Apache installation, follow the prompts to install, The things you want to write in accordance with your preferences, no effect, of course, the directory I still suggest you and PHP directory so, choose c: Directory, so that after installation can see c:apache2. After loading will be in the desktop right corner of the system tray display Apache icon, double-click can open the Apache Control Panel, you can stop or reboot the server.
here to do is to modify the c:apache2confhttpd.conf file, open in Notepad:
Found:
#NameVirtualHost *
modified to:
Namevirtualhost 127.0.0.1
Find:
<virtualhost 127.0.0.1>
Modify the following lines:
ServerAdmin (Administrator's mailbox you entered when you just installed)
DocumentRoot C: Apache2htdocs
ServerName Apache2
ErrorLog c:apache2logserror_log
Customlog c:apache2logsaccess_log Common
</virtualhost>
Found:
AddType application/x-tar. tgz
Add the following two lines below:
AddType application/ x-httpd-php. PHP
AddType image/x-icon. ico
Found:
#LoadModule ssl_module modules/mod_ssl.so
Add a row below:
LoadModule php4_module c:phpsapiphp4apache2.dll
Add default file:
Find DirectoryIndex * This line, you can modify this, add the default file name:
DirectoryIndex index.php default.php index.htm index.html default.htm> Save the file and restart the Apache server.
The environment for this PHP has been completely established.
Installation of <5>zend Optimizer (can not be installed)
After the download is an. exe file, directly installed on it, the installation process to choose your PHP version, you must choose accurate, here I choose PHP 4.3.x before the installation prompts whether to backup php.ini, the point is determined after the installation is finished.
Open PHP.ini, modify a place:
Found it:
[Zend]
You can see the following:
zend_optimizer.optimization_level=*
This line,
Change the value of = to 1023, which means to change the line to
zend_optimizer.optimization_level=1023
After the save on the OK Oh, restart Apache/iis, to this installation is all over. I am also very tired AH:)
<6> Test:
Use Notepad to create a new file, write down the following lines, save to the C:apache2htdocs directory, this directory is your site and directory, named phpinfo.php. then enter http://localhost/in the browser Phpinfo.php will be able to see all the information about PHP.
CODE
<?php
Phpinfo ();
?>
You need to be aware that when you save a file, the file's suffix name should be. php. (Notepad automatically adds a. txt suffix to the file name unless you take one of the following measures to avoid this.) When you save the file, the system will let you specify the file name, and then enclose your file name. (For example, "hello.php".) Alternatively, you can click the Save as Type Drop-down menu in the Save dialog box and change the setting to "All files." This allows you to enter a filename without quoting.
The above paragraph excerpt from "PHP Chinese Manual", more detailed installation material, please download this Chinese manual to the http://www.php.net/docs.php, inside has each kind of different system's detailed installment, but is not very intuitive, some optimizations also did not write out:)
Below I give a few software to use the download address:
PHP4.3.1 Stable version:
Http://www.blueidea.com/download/forum/php...4.3.1-Win32.zip
Mysql4.0.13 Stable version:
Http://www.blueidea.com/download/forum/mys...-4.0.13-win.zip
Apache2.0.45 Stable version:
Http://www.blueidea.com/download/forum/apa...-x86-no_ssl.msi
Zend Optimizer:
Http://www.blueidea.com/download/forum/zendoptimizer-2[1].1.0a-windows-i386.exe
In addition, the PHP4.3.2RC4 contains the pear package, PHP4.3.1 is not, if you download a compressed package, set the include path in PHP.ini, find the following two lines:
; Windows: "Path1;path2"
; include_path = ".:/ Php/includes "
Modified to:
; Windows: "Path1;path2"
include_path = "C:phppear"
Save, this is the PHP include file path, you can set multiple, with ";" Lattice open.