faqts : Computers : Programming : Languages : PHP : Installation and Setup : PHP4

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

26 of 67 people (39%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

I have installed PHP 4 with Apache, and when I try and run a php page, the browser prompts me to download the file instead of running the script.

Nov 23rd, 2000 00:18
Abe J-son, Mark Gizzo, http://www.php.net/


In your config-file (httpd.conf) for the apache webserver you will need 
to add:
ScriptAlias /php/ "c:/Program Files/Apache/php/"
(or whereever you have your php.exe-file)
AddType application/x-httpd-php3 .php .php3
AddType application/x-httpd-php3-source .phps
Action application/x-httpd-php3 "/php/php.exe"
I'm not sure of what php4 need, since I'm just running php3 (and are 
pleased with that!). 
Check the dokumentation on http://www.php.net/