Apache, PHP installation and configuration under Windows 9x/nt

Source: Internet
Author: User
Tags install php ini win32
Probably the most asked question in the PHP mailing list is: "How do I install PHP on my windows machine?" "Then perhaps I can help to answer that question. When you are properly installed, you will find that it is good to develop PHP programs under Windows.
 
The purpose of this tutorial is to show you how to use the "Apache and Windows" combination to develop PHP programs.
 
If a specific version is not specified in the tutorial, PHP is PHP3 or PHP4 Beta 2 or 3,apache 1.3.x.
 
First, install Apache
First, you need a Web server, I recommend Apache. Let's go to htp://www.apache.org/dist first. On this page there is a list of the world's Apache mirror sites, finding the one closest to you. Apache software is generally called Apache_1_3_x.win32.exe. Take it to your machine and run it. It will ask you where to install Apache, you can set it to C:apache, because right now you will have to modify its configuration file. If there is nothing wrong with the installation, Apache can be used. There are many Readme files available for reference, but only one file is for the Win32 platform, including window 9x and Windows NT.
 
Second, the installation of PHP
This problem appears too many times in the PHP mailing list. You need to install the latest Windows version of PHP. You might think of compiling PHP3 yourself, but I don't think it's necessary for general development purposes. PHP also has mirror sites all over the world (China does not seem to be). Select a mirror, locate the download area, select "Source Code and Windows distribution" and download "Windows Binary". All you need to do is unzip the file (WinZip) into your favorite catalogue, such as C:PHP4B3. I recommend using the version number as the directory name so that you don't have to delete the old version when you try to update it later.
 
Installing PHP4 Beta under Windows 95/97 requires the support of DCOM. If your machine is not installed, download a copy here.
 
Third, configure PHP
The package that is distributed with PHP has a readme file that tells you how to configure it. There is a file named Php.ini-dist, which is the primary configuration file for PHP. Copy it to your Windows system directory (Windows 9x Windows or Windows NT Winnt directory) and rename it to PHP.ini. You need to make appropriate changes to this file, the most important thing is to add a number of possible modules, such as MySQL. Find this section in the php.ini file as follows:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions;
;;;;;;;;;;;;;;;;;;;;;;
; If you are wish to have a extension loaded automaticly, use the
; Following syntax:extension=modulename.extension
; For example, on Windows,
; Extension=msql.dll; or under UNIX,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.