note 38494 rejected from install.apache2 by nathan
| From: | nathan@php.net | Date: | Wed, 24 Dec 2003 05:12:55 +0000 |
| Subject: | note 38494 rejected from install.apache2 by nathan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62400@lists.php.net to get a copy of this message | ||
Note Submitter: surforever at lycos dot com
----
Please help
I cannot install php 4.3.4 with latest apache server under winXP
here is what I did...(read below the instructions that
I copied)
I tried to install CGI version of PHP as well as Apache module, but can't get it working still.
Apache works and I can run any file from htdocs dir but not php files (seems like php parser
doesn't work)
----
The CGI Version of PHP
To configure Apache to use the CGI version of PHP, you simply make a few modifications to the Apache
configuration file, the httpd.conf file located in the conf directory within the Apache installation
directory.
Open the httpd.conf file with a text editor such as Notepad.
Look for a section of text like the one shown in the figure.
Add a line like the following:
ScriptAlias /php/ "C:/php-4.2.1-win32/"
Next, you have to add a directive to the httpd.conf file to define the file extensions used by PHP
files. Common extensions are .php and .phtml, but you can use whatever you'd like.
Look for a section of text like the one shown in the figure.
Add the following two lines:
AddType application/x-httpd-php .phtml .php
AddType application/x-httpd-php-source .phps
Make one more modification to the httpd.conf file, and you'll be done.
Look for a section of text like the one shown in the figure.
Add the following line:
Action application/x-httpd-php /php/php.exe
Save and close the httpd.conf file.
This final modification tells Apache that anytime a file with an extension of .php or .phtml is
requested, Apache should first run that file through the PHP parser before sending any output to the
Web browser.
The Apache Module Version of PHP
To configure Apache to use the module version, you have to move one piece of PHP and also make a few
modifications to the Apache configuration file, the httpd.conf file located in the conf directory
within the Apache installation directory.
In C:\php-4.2.1-win32\ you should have a file called php4ts.dll. Move that file to C:\Windows\system
(for Windows 98/Me) or to C:\WINNT\system32 (for Windows NT/2000).
Open the httpd.conf file with a text editor such as Notepad.
Look for a section of text like the one shown in the figure.
Add a line like the following:
LoadModule php4_module c:/php-4.2.1-win32/sapi/php4apache.dll
Directly beneath the text you just entered, look for a section of text like the one shown in the
figure.
Add the following line:
AddModule mod_php4.c
Next, you have to add a directive to the httpd.conf file to define the file extensions used by PHP
files. Common extensions are .php and .phtml, but you can use whatever you'd like.
Look for a section of text like the one shown in the figure.
Add the following two lines:
AddType application/x-httpd-php .phtml .php
AddType application/x-httpd-php-source .phps
Save and close the httpd.conf file.
This final modification tells Apache that any time a file with an extension of .php or .phtml is
requested, Apache should utilize the module version of the PHP parser before sending any output to
the Web browser.