1: Download the software
http://www.php.net/downloads.php
http://www.mysql.com/downloads
http://sourceforge.net/projects/phpmyadmin
http://www.zend.com/store
http://httpd.apache.org/download.cgi2: Configure PHP to extract php-x.x.x-win32.zip into the root directory of the C drive. After decompression is completed, we should find a folder named PHP-X.x-win32 in the C-drive root directory to change its name to PHP4. Entering the folder, we can clearly see the directory structure of the PHP is shown below:
I will explain the directory used by several configurations:
[DLLS] Store the DLL that supports the extension library. So what is PHP DLL extension? It is the basic functionality of PHP. For example, you need to generate an image with PHP, then you have to use the GD library expansion, which contains a series of image generated functions. In this way, it is easy to expand the application range of PHP. So you need to tell PHP when you configure PHP you need the support of the expansion library.
[EXTENSIONS] PHP extension DLL. This is the location of the PHP search expansion library.
[PEAR] PEAR is the extension path of PHP and the PHP Extension and Application Repository. More access to http://pear.php.net.
[SAPI] Store SAPI's DLL file.
[Go-pear.bat] Install the file required by PEAR.
[Install.txt] Install the instruction file.
[Php4ts.dll] The primary DLL file.
[Php.exe] CGI executable program.
[Php.ini-dist] PHP configuration file
Explain these major directories and documents, there may be some newcomers, huh, huh, don't be afraid, open these rare quirky names and proprietary nouns. We installed PHP directly, but the declaration is first, the following steps can not be mistaken in one step, careful point, yes. Again, the path mentioned below, if there is no special instruction, suitable for the various version operating systems after Windows 98, I am using Windows Server 2003 as an exemplary operating system.
Step 1: Copy the php4ts.dll file to the C: / Windows / Directory (if it is a Windows 2000 / NT operating system, it is a C: / Winnt / Directory, the same. Please note your Windows version corresponding to the folder) .
Step 2: All DLL files under the [DLLS] folder are copied to the C: / Windows / System32 / Directory (if it is a Windows 2000 / NT operating system, it is a C: / Winnt / System32 / directory; if it is Windows 98, then a C: / Windows / System / Directory. Next. Please note that your Windows version corresponds to the folder).
Step 3: Copy the php.ini-dist file to the C: / Windows / folder, rename it is pHP.ini. Here you have to remind: Do not store the php.ini file in the PHP directory. That is to say, don't have a php.ini file in the C: / PHP4 directory (if you are newly installed in my step, there is no such situation). Now we already have a php.ini file in the c: / windows / directory, this file is a PHP configuration file, so configuring PHP is also focusing on it. Open it with Notepad. You can see a lot of English. Don't be afraid of English in English, huh, huh. I will explain some important configuration options in detail. I will illustrate the configuration of each part according to the order of the next order. First, find the part of Error Handling and Logging, here is the setup PHP warning level, that is, whether the PHP is allowed to give a corresponding warning or prompt when the PHP is run. Of course, we are learning and debugging PHP, which is necessary. Many rows are starting with a semicolon, and the semicolon is a comment for the * .ini file, we can learn the meaning of each warning level through these comments. Here we set the alarm level to: e_all & ~ e_notice:
Error_Reporting = E_ALL & ~ E_NOTICE
As shown below:
Find the Paths and Directories settings section, here is the setup PHP file search path. Multiple paths use a semicolon ";" set, we set a search path, point to the C: / PHP4 / PEAR / directory, remove the semicolil in front of the include_path, change the quotation marks in the inner address to C: / PHP4 / PEAR /:
; UNIX: "/ Path1: / Path2"
Include_path = ".: / php / incrudes"
;
Windows: "/ Path1; / Path2"
INCLUDE_PATH = "C: / PHP4 / PEAR /
As shown below:
Slightly down, find Extension_Dir, this is where the PHP search extension library is set, pointing its path to C: / PHP4 / EXTENSIONS / folder:
EXTENSION_DIR = "C: / PHP4 / EXTENSIONS /"
Set as shown below:
Find the File Uploads configuration section, here we can set the size of the PHP allows uploaded files (default is
2M
) And upload file storage (if you do not set up a temporary folder, the default is stored in the system's temporary folder), we can set it according to yourself, such as the upload size is set to
8M
, Set the file temporary folder to C: / Temp /, then we must establish a folder called Temp in the C-drive root directory, remember to remove the semicolon in front of the UPLOAD_TMP_DIR:
WHETHER TO Allow Http File Uploads.
FILE_UPLOADS = ON
; Temporary Directory for Http Uploaded Files (Will Use System Default IF NOT
Specified.
UPLOAD_TMP_DIR = "C: / TEMP /"
Maximum allowed Size for Uploaded Files.
UPLOAD_MAX_FILESIZE =
8M
As shown below:
Next, you will see the important PHP extension configuration section, find Dynamic Extensions, and the next point is the configuration section of Windows Extensions. It can be seen as:
EXTENSION = php_bz2.dll
EXTENSION = php_cpdf.dll
......
EXTENSION = php_yaz.dll
EXTENSION = php_zip.dll
All of the PHP's supported extensions are listed, and the semicolon comments are added in front, indicating that the PHP configuration does not support this extension, we can remove the semicolon to allow PHP to support these extensions, but because there is not included in the DLLS folder All Extended DLL files, so we can only selectively install, you need to know how to get the DLL files provided under other DLLS folders, you can view the "PHP Chinese Manual" (later will mention its download method) Related parts. Not explained here. 3: Configure mysql and phpmyadmin (phpMyadmin is a MySQL webpage remote management interface)