faqts : Computers : Internet : Web Servers : Apache

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 12 people (83%) answered Yes
Recently 9 of 10 people (90%) answered Yes


How can i see correctly the information (documents HTML with PHP3), that i put in Apache Server, in Windows.

Aug 1st, 2004 09:20
Cinley Rodick, Bruce Christensen, Guest, http://www.php.net/manual/en/install.apache.php , http://www.generalforums.com . http://www.generalforums.com/yellow/

Before we start, the following instructions assume that:
 - Apache 1.3.x is already installed in C:\Apache. If you don't already
   have Apache, you can download it from http://httpd.apache.org/.
 - PHP 4.x is installed in C:\PHP. You can get PHP from 
There are two ways that Apache can "talk" to PHP. It can
either run PHP as a separate program (as a CGI program), or it can make
PHP part of the Apache program itself (as an Apache module). Modules are
generally faster, so you'll probably want to take the module approach.
Once you have Apache and PHP installed, you must edit the Apache
configuration file to allow Apache to correctly process PHP files. This
file is C:\Apache\conf\httpd.conf; you can use any text editor,
including Notepad, to modify the file. Here are the lines you'll need to
add to make PHP run as an Apache module:
    LoadModule php4_module c:/php/sapi/php4apache.dll
    AddType application/x-httpd-php .php .phtml
The first line tells Apache to load the PHP processor into itself, and
the second line tells Apache to run any file with a .php or .phtml
extention through PHP.
After you've made the changes to httpd.conf, make sure that you've
saved the file. You'll then need to copy c:\php\php4ts.dll to
c:\windows\system (for Windows 9x/Me) or c:\winnt\system32 (for Windows
That should do it. Just start (or restart) Apache, and you'll be off
and running with PHP.
Just in case you want to run PHP as a CGI program instead of an
Apache module, add the following lines to your httpd.conf file in place
of the ones above:
    ScriptAlias /php/ "c:/php/"
    AddType application/x-httpd-php .php .phtml
    Action application/x-httpd-php "/php/php.exe"