SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MAMP/ MySQL: Browser can't find PHP file in MAMP folder

    I've downloaded and successfully installed MAMP on my Mac (running 10.5.7)
    I'm following along in the Sitepoint book, "Build you Own database Driven Web Site Using PHP & MySQL.

    I have created a "today.php" file and saved it in the Applications>MAMP>htdocs folder.

    ..however when I enter the URL htp://localhost/today.php, it says "Firefox can't establish a connection to the server at localhost."

    Here's the kicker. I remember trying to install MySQL last summer. If I remember correctly I installed it individually, not in a package like MAMP.

    Would this create an issue for me?
    Do I need to write a different file path in the directory?

    Thanks,
    Shane

  2. #2
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by shane.ry.pa View Post
    I've downloaded and successfully installed MAMP on my Mac (running 10.5.7)
    I'm following along in the Sitepoint book, "Build you Own database Driven Web Site Using PHP & MySQL.

    I have created a "today.php" file and saved it in the Applications>MAMP>htdocs folder.

    ..however when I enter the URL htp://localhost/today.php, it says "Firefox can't establish a connection to the server at localhost."

    Here's the kicker. I remember trying to install MySQL last summer. If I remember correctly I installed it individually, not in a package like MAMP.

    Would this create an issue for me?
    Do I need to write a different file path in the directory?

    Thanks,
    Shane
    Well first of all, you said you entered the URL: 'htp://localhost/today.php' which contains a typo (http) I'm pretty sure that it's just a typo while posting this thread.

    I don't know much about Mac's, but can you check whether a service is even running on localhost port 80? Perhaps MAMP runs on a different port, so it might be worthwhile to check 8080 (which is also commonly used).

    Or it could that a firewall is blocking port 80/MAMP service internally, so might want to check that out.

  3. #3
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First. Thank you for responding.
    Next. Yes, I did leave out the "t" in "http" because Sitepoint won't let me post a link.

    I will check if a service is running on localhost port 80. As well as 8080. I will also check out the firewall situation.

  4. #4
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, so I set my firewall to allow MAMP also msqld.

    I couldn't find where to check to see what services/ports are running.

    I do know that the Apache server as well as the MySQL server are both running.

    I still get "Firefox can't establish a connection to the server at localhost."

    Is this a server issue? Or is it because I may have two MySQL databases set up?

  5. #5
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by shane.ry.pa View Post
    OK, so I set my firewall to allow MAMP also msqld.

    I couldn't find where to check to see what services/ports are running.

    I do know that the Apache server as well as the MySQL server are both running.

    I still get "Firefox can't establish a connection to the server at localhost."

    Is this a server issue? Or is it because I may have two MySQL databases set up?
    No it should not matter if you have more than 1 database. Since Apache will run regardless of MySQL. It seems that something is wrong with your Apache installation, try checking the Apache httpd.conf

  6. #6
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got it to work. I ditched MAMP and installed everything independently.

    Thanks for your help!


Tags for this Thread

Bookmarks

Posting Permissions

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