1. Installing PHP is accurately said to install a PHP parser because it can explain the PHP code to display. The author installs PHP4.3.3. It is recommended that novices should install the latest version, because the first reference is small, the second may have a lot more than the old version. Don't install too old version, this is considering from compatibility. It should be in line with the traditional Chinese doctrine, and the medium version is selected. (1) Unfaze the downloaded PHP installation package to your C drive root directory (here, the Calcutical Dish is used to modify the debugging in order, you can also choose a different directory), you should get a similar "PHP-4.3.3-win32" directory, change the directory name to "PHP" (large and lowercase). (2) Open the PHP directory you just decompressed, you will find a file called "php.ini-dist", this is the PHP configuration file, you need to change it into "php.ini", then copy it to the system Directory WinNT. (3) "php4ts.dll" in the PHP installation directory must be copied to the article in the System32 directory of the Windows system. It is recommended to copy all the files in the DLLS and Extensions Directory to System32, which seems to be not necessary. Someone may need to modify the register_globals, which defaults OFF, which means that it means to open global variables, for future programming. 2. Installing the Apache author installed 2.0.50 recommended first to stop your IIS or PWS service. Because both are the default 80 port, if IIS is stopped, it can be installed, and it can be configured in the configuration file in the configuration file. (1) Run your downloaded apache2 installation file, install Apache, will prompt you for the host name, administrator mailbox, etc. during the installation process, which can be modified after you installed, so you can rest assured. (* For the future, it is strongly recommended to change the installation path here to "Change" to "X:" (Note X for your hard disk) or in accordance with the 8.3 file name format, each time When you enter an Apache installation path, you don't have to add quotes for it. After the system is installed, it will automatically create a directory called "Apache2", that is, the path where the actual Apache system file after the installation will be "x: / Apache2 "directory. *) After installation, find ServerAdmin under apache2 / conf / httpd.conf, you can modify the administrator mailbox, (near 199); 213 row is servername I change to localhost (2) Edit Apache2 / Conf / httpd.conf 120 row Listen 80 is changed to 81 port, because when your Win2k restarts, IIS will account for 80 ports to avoid conflicts, so Apache uses 81 ports. The following 134-170 lines are part of the load module. In this section, add two sentences: loadModule php4_module c: / php/sapi/php4apache2.dll // Note: If your php directory is not C: / PHP, please write it according to actual. AddType Application / X-httpd-php .phpaddType Application / X-httpd-php .php3addtype application / x-httpd-php .php 4 Note that there is a space must be added, otherwise an error is reported.
(This sentence can also be added to the ADDTYPE Application / X-tar .tgz of 768 lines, but I didn't make it in this way. I didn't make it) meaning: loading the PHP4 module, where the second sentence is just AddType Application / X-httpd-php .php can only parse the PHP extension file, the PHP3 extension of the program can't be parsed. Note: We are generally modular running PHP, so just like this, some articles say this add: Scriptalias / PHP / "C: / php /" addtype application / x-httpd-php .phpace application / x-httpd- PHP "/ php/php.exe" or loadModule php4_module2.dll addtype application / x-httpd-php .php4 scriptalias / php4 / "c: / php /" action application / x-httpd- PHP4 "/ php4/php.exe" AddType Application / X-httpd-php4 .php is actually running PHP in CGI, not that necessary. Find DirectoryIndex * This line can be modified, add the default file name: DirectoryIndex index.php default.php index.htm index.html default.htm default.html Otherwise, INDEX.PHP cannot be automatically identified. Make it supports Chinese's best solution is to modify the conf / httpd.conf file in Apache, find the AddDefaultcharset ISO-8859-1 and changed to #adddefaultcharset ISO-8859-1 AddDefaultCharset GB2312 Note that the files made using Dreamweaver : In fact, this often leads to Chinese in the document! ! Because: http.conf 355 lines DEFAULTTYPE TEXT / PLAIN instead of text / html, so manually modify it to text / plain, display Chinese. (3) Running a variety of ways to run apache You can c: Apache2 / bin> Enter Apache -k install // This is the installation service Enter apache -k start // This is the start-up service can also start - program - Apache Httpserver 2.0.50 Control (4) Access http: // localhost: 81 Display Apache Welcome page (Congratulations, Apache2 Installation Success) Write the simplest PHP program Phpphpinfo ();?>, Named info.php Store under Apache2 / HTDOCS, then knock in the address bar to http: // localhost: 81 / info.php should display the information about PHP and Apache2, so that you can start PHP learning. 3. MYSQL installation MySQL is easy to install successfully, the installation is simple, but the debug is difficult.