By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

php file is downloading instead of running in WAMP

P: 32
hi all,

Im currently using WAMP as my local host server.

i have created 3 files.

an html file (index)

a php processing file (to check the forms entries before submitting it)

a php apply to database file


the problem im having is that when i click submit on the html file, it just wants to download the php file, rather than running it. I have had the code tested and works fine on another machine
May 15 '07 #1
Share this Question
Share on Google+
4 Replies


kamill
P: 71
There can be two cause of your problem either you have saved your php page outside of wamp directory or may be PHP is not installed in your mechine.
Create a file with phpinfo(), run it and see the configuration of your PHP.
+++++++++
kamill
+++++++++
hi all,

Im currently using WAMP as my local host server.

i have created 3 files.

an html file (index)

a php processing file (to check the forms entries before submitting it)

a php apply to database file


the problem im having is that when i click submit on the html file, it just wants to download the php file, rather than running it. I have had the code tested and works fine on another machine
May 15 '07 #2

P: 32
i have done that and it does the same thing.

does wamp not include php?
May 15 '07 #3

P: 32
i have now scrapped wamp and instead loaded and configured apache.

the test you gave me works fine, yet when i attempt to run any script it still just wants to open it in dreamweaver
May 15 '07 #4

pbmods
Expert 5K+
P: 5,821
Did you configure your webserver software properly?

Make sure you have this line somewhere in (if you use Apache) httpd.conf:
Expand|Select|Wrap|Line Numbers
  1. AddType application/x-httpd-php .php
  2.  
May 15 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.