Click to See Complete Forum and Search --> : apache php little help


pura
05-24-2007, 04:33 PM
Hi

I tried to run php with Apache in windows. But Apache doesn't recognize the PHP file and returns an alert box to save a file.

i knew that i need to have a line
AddType application/x-httpd-php. php
in httpd.conf under conf directory or apache installed directory. But this doesn't work. can i get any help please.

many thanks

devinemke
05-24-2007, 04:47 PM
to run PHP as a CGI process place the following in your httpd.conf:

ScriptAlias /php/ "C:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

substitiute C:/php/ with whatever is your actual path to PHP

reeksy
05-24-2007, 06:27 PM
have you enabled PHP in the apache conf?

LoadModule php5_module c:/php/php5apache2.dll

bradgrafelman
05-24-2007, 07:11 PM
Better yet, have you actually followed the directions for installing PHP?

install.windows.manual
install.windows.apache2 (assuming you're using Apache 2.x)

EDIT: Also, please do not cross-post the same post across different forums.