Jump to content

Running and executing php on localhost


yrstruly

Recommended Posts

HelloI have installed xampp on my pc and it looks fine cause system is running. Im having trouble running my php file on my pc/local host. It keeps on asking if i wanna save the file and the file is already saved and also dont wanna download the file when i press save.Please help?

Link to comment
Share on other sites

HelloI have installed xampp on my pc and it looks fine cause system is running. Im having trouble running my php file on my pc/local host. It keeps on asking if i wanna save the file and the file is already saved and also dont wanna download the file when i press save.Please help?
It seems that .php files are considered ordinary files and not being parsed by PHP. To resolve this, you need to modify your Apache httpd.conf file. At the bottom of the file and the following libes of directives. (Before adding, search the entire file and modify it) LoadModule php5_module "location/of/your/php/module"AddType application/x-httpd-php .php Restart your Apache server. Then test.
Link to comment
Share on other sites

It seems like you're trying to run PHP files by double clicking on them... Do NOT start PHP files like that.Open your browser, and type "localhost". That is the place from which Apache (and inherently, PHP) runs. All paths must be relative to that.Check this part of the XAMPP FAQ for details.You could also try reinstalling XAMPP, or do the suggested settings above. XAMPP should do these by default.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...