PHP and localhost

I’m having a problem where I am prompted to download or open a .php file on my localhost, instead of displaying in the browser. The .php files all work properly on the live server, but not on any of my localhosts, which I have three. I have downloaded and installed Wamp Server 2.0i.

I’ve tested everything possible and it’s showing php and Apache are running properly. I’ve added the following lines to the httpd and php and confd .ini files, but still no luck.

AddHandler application/x-httpd-php .php .phtml
AddHandler x-httpd-php .php .phtml

The localhost displays all .html pages, but not .php pages. I also have some PHP SS Includes and they are not displaying properly. All the php code is being sent to the browser as text. It appears as though the php is not being parsed.

I’ve also tried all of this through IIS and Xampp and have the same problem.

Can anyone please help me with this problem? I would greatly appreciate it.

How do you open your php scripts in your browser, i.e. http://localhost/index.php ?

Sponsor our Newsletter | Privacy Policy | Terms of Service