Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2008
    Posts
    113
    Thanks
    27
    Thanked 0 Times in 0 Posts

    localhost issues with MAMP

    I'm new to PHP and setting up local hosts. I installed MAMP on my Mac, and have been using it to experiment with Joomla and Drupal. Recently I added a site I'm working on in collaboration with another developer. He converted some basic HTML pages I made into PHP so the header and footer could be called globally. He placed these files on our host's server, and I downloaded them from that location. I have been unable to view this site on my local host. When I enter the address in my browser, a copy gets downloaded to my system. Does anyone know why this would happen? Here's what I've entered into the address bar:

    http://localhost:8888/TAJ (TAJ is the site's root folder)

    My Joomla and Drupal sites in that location are still working properly. I imagine this is something simple, but since I know very little about PHP I'm not sure what to do. Am I missing some database info or something? Thanks.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    The file has PHP in it; what is the name of the file? Does it end in .php or .html? (The latter will not parse the PHP in a default configuration)

    If the extension is .php, try putting only <?php phpinfo(); ?> in a file named test.php, browse to that and see what that gives you.

  • #3
    Regular Coder
    Join Date
    Jun 2008
    Posts
    113
    Thanks
    27
    Thanked 0 Times in 0 Posts
    Thanks for the response. The file does have the appropriate PHP extension, and the test.php file behaves as expects. As I mentioned, I also have other PHP sites in this location that are working properly.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •