problem executing php on local server

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

problem executing php on local server

Postby elias75 » 12. March 2009 12:33

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
elias75
 
Posts: 15
Joined: 12. March 2009 12:24

Re: problem executing php on local server

Postby elias75 » 12. March 2009 19:27

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!
elias75
 
Posts: 15
Joined: 12. March 2009 12:24

Re: problem executing php on local server

Postby ragortue » 12. October 2015 18:30

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.
Centos 5.6 Image
ragortue
 
Posts: 10
Joined: 09. March 2015 16:21
Operating System: Centos 5.6


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 54 guests