Browser downloads php-file instead of executing it

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Browser downloads php-file instead of executing it

Postby jimerik » 28. February 2010 16:59


I realize this is a noob question, anyway:

I have tried to modify this ( contact form to work locally.
I have put all the files into my htdocs folder.

Now, when I push the submit button (start the php script) my browser wants to download the php file instead of running it like it should.

I have read a similar thread ( where the solution was to clean the browser cache. This did not solve it for me though.

By the way, phpinfo() works fine on the http://localhost/xampp page.
I have also tried to put the files in the htdocs/xampp folder (where all the xampp files are located), but the same thing happens.

EDIT: When I upload the files to my web hotel, it works - but it would be nice to get it to work locally too though..

Has anyone got any ideas on this?
Posts: 1
Joined: 28. February 2010 16:48

Re: Browser downloads php-file instead of executing it

Postby MC10 » 01. March 2010 04:21

You cannot access the file locally (as in C:\xampp\htdocs\filename.php). You need to access it through http://localhost/filename.php (replacing filename with the actual name you gave the file).
Posts: 148
Joined: 20. February 2010 20:13

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 93 guests