Why when I enter the name of a .php file does it want to save it on my hard drive instead of running it ?
Posted on 13 May 2010 by Abidoon
I just installed a .php script onto my web server and when I go to run the program, instead of the program running I get a pop up window wanting to save the file on my hard drive. I re-uploaded the files to make sure everything was done correctly, but I still get the error message.
Can someone please help me out – I really need to run this program.
Thanks in advance.
Tags | drive, enter, file, hard, instead, Name, PHP, Running, save, want

your web server (host) does not serve PHP (execute them)
most likely your host is running on a windows system and PHP is not installed on it.
you can make sure of it by contacting the customer support of that host
make sure your host supports php. if it is a free host, alot of them DO NOT support php, however there are a few such as 000webhost.com that supports PHP and will work for you.if it doesnt it will only allow downloading of the file
one more thing to check is make sure the php script is configured correctly.
The web server has to know about PHP. This means two things:
1. PHP is installed
2. Your web server is configured to use it.
For example, are you using apache? If so your httpd.conf must contain:
LoadModule php5_module “c:/php/php5apache2_2.dll”
AddType application/x-httpd-php .php
PHPIniDir “c:/php”
And you should likely have:
DirectoryIndex index.php index.html
You will need to change the c:/php/php5apache2_2.dll and c:/php paths so they are correct for your installation.