Install PHP 4.1.1 □ text / Platinum www.soulogic.com / Platinum www.soulogic.com Articles in Windows 2000 Http://www.soulogic.com/platinum/doc/apachemodule/ If you follow this article What? Question, please call the software version, which step, the error message, or the phenomenon tells me, my e-mail is Platinum@soulogic.com, or in my message version, the address is http: // www. Soulogic.com/guestbook/ This article is reproduced any, but please respect the author's right
Software version used by this author: Windows 2000 Server Build 2195PHP 4.1.1Apache 1.3.22
If you are installing PHP for the first time, I hope you can install it once in the following instructions (including path names, etc.). If you have successfully installed PHP in CGI mode, try the Apache module mode, please click here to See the fourth step. The first step: Downloading the software has a necessary habit is to download the software required only in the official site. Apache official download page: http://www.apache.org/dist/httpd/binaries/dist/httpd/binaries/win32/php official download page: http://www.php.net/downloads.php※ Note: PHP must download ZIP compression package Instead of that .exe file, it will not be installed in module. Step 2: Installing Apache and PHP The entire installation process is simple, run the apache installation file, you need to fill in the host name and administrator mailbox in the middle. If it is a single machine, you don't have to pay attention to this, just write something, you can. Anyway, you can also modify it. The figure below shows the interface in the Apache installation as in PHP, and directly compresses the PHP packet to a directory. Here are my habits, usually install apache into C: / Program Files, and decompress PHP to C: / PHP - I don't think it is necessary unless your hard disk is only one area. I am used to put them all among the E: / Server directory, and all the things related to Web Server are put there, and I say mysql. This is very easy to recover the entire Web Server after you will reload the system. Note the installation path of the figure below. When the Apache installation is over, it has already started running, and you can start (start), restart (rest) or stop (STOP) Apache later by starting menus → Apache HTTP Server → Control Apache Server. Of course, "Services" in Manage Tools can also be used for the same operation. Step 3: Configuring Apache's httpd.conf file Modifying Apache's option to complete with a text editor by editing the httpd.conf file under Apache's confed. This file is large, and there is more than 1,000 lines in the default. The indication of the ## indicates the content of the comment, and does not work. First change the E: / Server / Apache / HTDOCs in DocumentRoot "E: / Server / Apache / HTDOCS" to you store the webpage, such as E: / WWW, note that the slash "/" rather than usual backslash Bar "/" (below). ※ Note: Every time you change http.conf, you must take effect through the restart in the menu. This is a problem that is very easy to forget when you start. Now let's copy to the E: / www directory, then open the browser, open the browser, type http://localhost/index.html in the address bar, if you can see the file Description Apache is already normal the work. Step 4: Install the PHP in module to first rename the php.ini-recommented file under the PHP directory (E: / Server / PHP) to PHP.INI and copy it to the Apache directory, such as "E: / Server / Apache" . Like httpd.conf, all PHP configuration options are recorded in php.ini.
Here are some places that need to be changed: extension_dir = ./ Change to extension_dir = "e: / server / php / extensions" DOC_ROOT = change to doc_root = "e: / www" session.save_path = / tmp change to session.save_path = "C: / Winnt / Temp"; UPLOAD_TMP_DIR = Change to UPLOAD_TMP_DIR = "C: / WinNT / TEMP". Note; you have to go out, the same. ; default_charset = "ISO-8859-1" changed to default_charset = "GB2312" has a row; extension = php_xxx.dll will start as needed; mark, such as php_gd.dll can use the GD library, PHP_Mssql.dll is used Connect Microsoft SQL Server, etc.. When you really need this feature, you will go again; No. Otherwise, you can only waste system resources. Copy the php4tsts.dll file under the PHP directory after completion of php.ini.
Finally modify the httpd.conf file of Apache. Add the following three lines at the end of the file: loadModule PHP4_MODULE E: /SERVER/PHP/SAPI/php4apache.dll addModule MOD_PHP4.C AddType Application / X-httpd-php .php Third Behavior Set the suffix, if you want, you can continue Add ADDTYPE Application / X-httpd-php .php3 add .phtml, etc., so that all of the suffixes on the server will run as a PHP script. Find DirectoryIndex Index.html, will add "index.php" in front of Index.html, and there is a space between the two.
All of this is completed, follow up Apache. In E: / WWW, new files named Ver.php, the content of this file is only three lines: Php phpinfo ()?> After saving, open the browser, type http: // localhost / ver in the address bar. .php, if you can see a long form description (as shown below) installation success. The third line Server API indicates the current APACHE module mode. Open the management tool → service now, you can also see the description of Apache changes. If you have seen the same picture on your machine, then, congratulations, you have completed the installation of the PHP module.