Home  >  Article  >  Backend Development  >  Apache, PHP under Windows 9x/NT_PHP Tutorial

Apache, PHP under Windows 9x/NT_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:07:58711browse

Probably the most asked question on the PHP mailing list is: "How do I install PHP on my Windows machine?", so maybe I can help answer that question. When you have installed it correctly, you will find that it is good to develop PHP programs under Windows.

The purpose of this tutorial is to show you how to develop PHP programs using a combination of "Apache and Windows".

If the specific version is not specified in the tutorial, PHP is PHP3 or PHP4 Beta 2 or 3, and Apache is 1.3.x.

1. Install Apache
First of all, you need a WEB server, I recommend Apache. First go to http://www.apache.org/dist and take a look. On this page is a list of Apache mirror sites worldwide, find the one closest to you. Apache software is generally called apache_1_3_x.win32.exe. Put it into your machine and run it. It will ask you where to install Apache. You can set it to c:Apache because you will need to modify its configuration file soon. If nothing goes wrong with the installation, Apache will be ready to use. There are many readme files for reference, but only one file talks about the Win32 platform, including Window 9x and Windows NT.

2. Install PHP
This question appears too many times in the PHP mailing list. You need to install the latest Windows version of PHP. You might be tempted to compile PHP3 yourself, but I don't think for general development purposes this is necessary. PHP also has mirror sites all over the world (it seems there are none in China). Select an image, find the download area, select "Source code and Windows distribution", and download "Windows Binary". You only need to Unzip the current file (WinZip is good) to a directory you like, such as C:PHP4B3. I recommend using the version number as the directory name, so that when you try a newer version in the future, you don’t need to delete the old one. Version.

Installing PHP4 Beta under Windows 95/97 requires DCOM support. If it is not installed on your machine, go here to download a copy.

3. Configure PHP
There is a Readme file in the file package distributed with PHP, which describes how to configure it. There is a file called PHP.INI-dist which is the main configuration file of PHP. Copy it to your Windows system directory (Windows for Windows 9x or WinNT for Windows NT) and rename it PHP.INI. This file needs to be modified appropriately. The most important thing is to add some modules that may be used, such as MySQL. Find the following section in the PHP.INI file:
;;;;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions;
;;;;;;;;;;;;;;;;;;;;;;
; if you wish to have an extension loaded automatically, use the
; following syntax: extension=modulename.extension
; for example, on windows,
; extension=msql.dll; or under UNIX,

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629880.htmlTechArticleProbably the most asked question on the PHP mailing list is: “How do I install PHP on my Windows machine? ”, then maybe I can help answer that question. When you have installed it correctly...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn