Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Oct 2016
    Posts
    7
    Member #
    55540

    PHP code not running

    Hey, so I've been working on a website and recently tried to add php to it because I need to connect to a database, but all of my php code shows on the page. I have it all within the correct php tag and I saved it as a .php file. Do I need to download anything?
    Last edited by Irantwomiles; Oct 29th, 2016 at 02:32 PM.

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    The server needs to be capable of handling PHP and serving the extension properly. That sounds like your trouble.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    Oct 2016
    Posts
    7
    Member #
    55540
    How would I go about fixing this?

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    Are you running all of this on your computer at home? Or are you doing it online with a webhost?

    If you're doing it at home, you need to make your computer a server / webhost server (WAMP installation w/PHP).

    If it is a shared webhost online, who is the webhost?


  6. #5
    Junior Member
    Join Date
    Oct 2016
    Posts
    7
    Member #
    55540
    I'm using WAMP as you said. Its all local. I've never had this problem before, but I'm also extremely new to all of this. Do I need to configure anything? I have everything set as default, and my PHP version is set to the latest 7.0.10. Also Do I have to upload to the webserver? How does that work?

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    Now you're getting a bit out of my area of expertise. Hopefully someone familiar with home servers (and WAMP) will enter into this thread.


  8. #7
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    How are you trying to access it? Via Wamp, you should be using an address like http://localhost or http://127.0.0.1

    Also, it has to be in the folder Wamp is serving from.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:03 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com