PHP Installation Guide

Source: Internet
Author: User
Tags sapi
PHP installation author: sports98 uses PHP environment more and more WEB work environment, PHP version is gradually improved from PHP3 to PHP4, then to php4.2.2php4.2.3, php4.3.0RC2; some time ago, someone asked a question about the combination of php4.2.2 and apache2. later, in linuxforum.net, I saw a post using the SOURCE change method to compile and didn't go to PHP for installation.

Author: sports98

More and more WEB work environments are used in PHP environments. The PHP version is gradually improved from PHP3 to PHP4, and then to php4.2.2.
Php4.2.3, php4.3.0RC2; someone asked php4.2.2 about the problem of integration with apache2 some time ago. Later in linuxforum.net
We can see that a post is compiled by changing the SOURCE method, and we didn't try it. With the work needs and personal interests
With PHP, since many other tasks are completed in the WIN system, I will focus on the configuration of PHP in the WIN system.

First, describe your machine configuration:
CPU: P4 1.5G
RAM: 256 MB
HD: 40 GB

System environment:
Windows Advanced Server Sp3

Web system:

IIS5.0
Apache
Apache2

Database:

Mysql4.0

Old version installation:

I used php4.1.2 in the early days. I have mentioned it in my post. here I will give a brief introduction.

I am used to installing PHP in IIS in The ISAPI mode, but I do not like the CGI mode (my hobby is only ~), It seems that many books have written
Most of the installation is in CGI mode. The reason is simple ~, The CGI installation mode is relatively simple,

Install PHP in CGI mode to IIS
======================================

Start-set-control panel-management tools-Internet service manager

Right-click a WEB site and choose [Properties]

Add the executable file "php.exe % s" to "website attribute dialog page"-"home directory"-"configuration"-"and find your PHP installation directory.
Needless to say, it must be php.

Modify your document and add index. php.

Run cmd.exe> net stop iisadmin> net start w3svc (you can also use the Internet service manager to restart IIS)

Visit your http: // localhost. of course, you 'd better put phpinfo () to check it.

* ****** Php4.1. *-4. 2. *-4.3.0

Install PHP to IIS in ISAPI mode
======================================
Start-set-control panel-management tools-Internet service manager

Right-click the * machine name-> attribute

Edit WWW attribute-ISAPI filter-add-name PHP, path should be % PATHTOPATH % \ sapi \ php4isapi. dll

Click "document-" to add index. php

Edit the site. repeat the steps to OK.

Restart IIS. see the method and then check

* ****** Php4.1. *-4. 2. *-4.3.0

Install PHP4.1 (3). X in apache mode to Apache/Apache2
==========================================================

Edit the Apache configuration file httpd. conf.
Add
LoadModule php4_module $ PATHTOPHP $/sapi/php4apache (2). dll -- (2) used by Apache2
AddModule mod_php4.c
AddType application/x-httpd-php. php
Add index. php after DirectoryIndex
(Other settings, such as the main server directory of the document)

Restart Apache
* ****** This method applies to PHP4.1.x/4.3.0

Install PHP4.1 (3). X in CGI mode to Apache/Apache2
==========================================================

Edit the Apache configuration file httpd. conf.
Add
ScriptAlias/php/"% PATHTOPHP %"
Action application/x-httpd-php "/php/php.exe"
AddType application/x-httpd-php. php
Add index. php after DirectoryIndex
(Other settings, such as the main server directory of the document)

Restart Apache
* ****** This method applies to PHP4.1.x/4.3.0

Install PHP4.2.x to Apache (Apache mode/cgi mode)
================================
Same method as 4.1

Install PHP4.2.X to Apache2

The installation has never been successful. an error is Prompted. the installation is successful after I change to php4.3.0RC2.

System Windows NT localhost 5.0 build 2195
Build Date Nov 27 2002 21:11:38
Server API Apache 2.0 Filter
================================


The above is my point of installation for PHP (in Windows). I hope it will be helpful to you. Wait for a while before you have a list of things in your hand and try again.
Installation in linux ~ :)


PHP Installation Instructions

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.