A concise guide to PHP installation

Source: Internet
Author: User
Tags filter install php iis net sapi version

PHP Installation



Author: sports98

The Web work environment with PHP environment is more and more, the PHP version is also gradually perfected from PHP3 to PHP4, then to php4.2.2
Php4.2.3,php4.3.0rc2 some time ago, some people asked php4.2.2 and apache2 the combination of problems, and later in Linuxforum.net
See a post using the method of change source through compiling, also did not try. With the needs of work and personal hobbies, on their own machine to make
With PHP, because a lot of other work is done under the win system, so I'm going to talk about PHP's configuration under the win system.

First explain my machine configuration:
CPU:P4 1.5G
ram:256mb
hd:40g

System environment:
Windows Advanced Server SP3

Web system:

IIS5.0
Apache
Apache2

Database:

Mysql4.0

Old version Installation:

The early adoption of the php4.1.2 installation method before the posts are mentioned, here again simple to say

Install PHP in IIS I am used to installing in ISAPI mode, and CGI mode does not like to use it (personal hobby ~), as if it were written in many books.
Most of the CGI mode is installed, for the simple reason that the ~,cgi installation mode is relatively simple,

PHP is installed in CGI mode to IIS
======================

Start-"Settings-" Control surface version-"Management tools-" Internet Services Manager

Right-click to select a Web site, select Properties

Web Site Properties Dialog page-"Home directory-" configuration-"Add-" Executable file (Php.exe%s%s)--Find your PHP installation directory
Extension Needless to say, it must be PHP.

Then revise your document and add a index.php

Run cmd.exe->net stop iisadmin->net start w3svc (you can also use Internet Services Manager to restart IIS)

Visit your http://localhost, of course, it is best to put a phpinfo ();

This method general php4.1.* -4.2.* -4.3.0

PHP is installed in ISAPI mode to IIS
=======================
Start-"Settings-" Control surface version-"Management tools-" Internet Services Manager

Right-select * Machine Name-"Properties"

Edit www Properties-"ISAPI Filter-" add-"named PHP, path should be%pathtopath%\sapi\php4isapi.dll

Click to select a document-"Add index.php"

Edit site, repeat step OK

Restart IIS, method see above, and then detect

This method general php4.1.* -4.2.* -4.3.0

PHP4.1 (3). X installs to apache/apache2 in Apache mode
========================================

Edit Apache configuration file httpd.conf
Increase
LoadModule php4_module $PATHTOPHP $/sapi/php4apache (2). dll--(2) is used by Apache2
Addmodule mod_php4.c
AddType application/x-httpd-php. php
Add index.php after DirectoryIndex
(Other documents, such as the main service directory, etc. set themselves)

Restart Apache
This method is suitable for php4.1.x/4.3.0

PHP4.1 (3). X is installed to apache/apache2 in CGI mode
========================================

Edit Apache configuration file httpd.conf
Increase
scriptalias/php/"%pathtophp%"
Action application/x-httpd-php "/php/php.exe"
AddType application/x-httpd-php. php
Add index.php after DirectoryIndex
(Other documents, such as the main service directory, etc. set themselves)

Restart Apache
This method is suitable for php4.1.x/4.3.0

php4.2.x installed to Apache (Apache mode/cgi mode)
====================
Method is the same as 4.1

php4.2.x installed to Apache2

No installation has been successful, prompt error, I replaced the PHP4.3.0RC2 after the successful installation

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


Above for my PHP (win system) installation of a point, I hope to help you. After a while, after a busy list, consider writing
Install under 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.