php file is downloading instead of running in WAMP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • micksitup
    New Member
    • Feb 2007
    • 32

    php file is downloading instead of running in WAMP

    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
  • kamill
    New Member
    • Dec 2006
    • 71

    #2
    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
    +++++++++
    Originally posted by micksitup
    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

    Comment

    • micksitup
      New Member
      • Feb 2007
      • 32

      #3
      i have done that and it does the same thing.

      does wamp not include php?

      Comment

      • micksitup
        New Member
        • Feb 2007
        • 32

        #4
        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

        Comment

        • pbmods
          Recognized Expert Expert
          • Apr 2007
          • 5821

          #5
          Did you configure your webserver software properly?

          Make sure you have this line somewhere in (if you use Apache) httpd.conf:
          Code:
          AddType application/x-httpd-php .php

          Comment

          Working...