Page 1 of 1

problem executing php on local server

PostPosted: 12. March 2009 12:33
by elias75
Hello all,
this is my first post, nice to be here! I am a newbie in webdesing, php, apache etc
I use dreamweaver CS3, XP home edition, SP3 and XAMPP 1.6.7
I am having a problem executing php files on my local server. When I upload php file on a webshost (hostgator etc) everything works fine but when I test them locally I get the following:
a dialog box what to do with file: 'save as' or 'open with' ... also from DW when I click on "Live Data View" I get the message :"HTTP error 404 file not found... possible reasons for the problem:
Files in the "..............." folder that have the ".php" file extension are not being executed by the testing server.
2) The "..............." folder does not map to the "http://localhost/....." URL on the testing server. Verify that the URL Prefix maps to the root of your site. [this is correct btw]
Apparently I need to to tell the server to *execute* the PHP code instead of serving it as source code (text) to the browser.
Please let me know how to do that!! I am struggling around in circles with this for the last 3 days :cry:
many thanks in advance

Re: problem executing php on local server

PostPosted: 12. March 2009 19:27
by elias75
I was given the answer to this question! And works fine now...
So, no matter what, even if you only have one php page and the rest are html, you need
to save all your website files in the C:\xampp\htdocs\whatever_name_is_your_folder_with_website
and then access locally your creation via C:\localhost\whatever_name_is_your_folder_with_website

The answer was given by 2 brilliant web magicians from www.noomle.com
check it! It is absolutely great for developing your parked domain names into mini sites!

Re: problem executing php on local server

PostPosted: 12. October 2015 18:30
by ragortue
you need
to save all your website files in the C:\xampp\htdocs\whatever_name_is_your_folder_with_website
and then access locally your creation via C:\localhost\whatever_name_is_your_folder_with_website


Thanks for posting this. Would be nice if this was listed on the tutorial as well.