Guide to MAMP and setting up my own server

Discussion in 'Web Design and Development' started by kitki83, Sep 22, 2008.

  1. kitki83 macrumors 6502a

    Mar 31, 2004
    Los Angeles
    I am taking a PHP course and the instructor recommended we try setting up a localhost but our textbook has different approach. We where instructed to use LAMP, WAMP or MAMP depending on our system.

    I just installed MAMP and running but not sure how is the localhost setup suppose to be, can I just open php file having phpInfo(); and get results. So far FF3 just shows the Header html.

    Can someone give me a guide to setting up and able to run my own local server?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Hello in PHP</title>

    <h1>Hello in PHP</h1>
    print "Hello, world!";


    Aside from this is it possible to create Flash website using readfile(text.txt); for the content?
  2. tominated macrumors 68000


    Jul 7, 2006
    Queensland, Australia
    put all the files for the website in /Applications/MAMP/htdocs and you should be ready to go.
  3. kitki83 thread starter macrumors 6502a

    Mar 31, 2004
    Los Angeles
    That's where I saved the file as php at. Still will not showing the PHP portion. I am running MAMP while doing it.
  4. angelwatt Moderator emeritus


    Aug 16, 2005
    Are you opening http://localhost/ ? As long as a index.php file is inside the htdocs folder that should do the trick. If it has a different name then type that in at the end. Also, just in case, make sure to open up the MAMP control panel and turn on the servers.
  5. Poeben macrumors 6502

    Jul 29, 2004
    1. MAMP runs on it's own port, 8888 by default. Keep that in mind in your urls.
    2. Short php tags may be disabled by default in MAMP. I don't recall to be honest.
  6. kitki83 thread starter macrumors 6502a

    Mar 31, 2004
    Los Angeles
    I figured it out for future reference what I did is click on home page of MAMP
    which took me to

    I then saw the port number so that was my missing part

    and loaded my site just as I wanted.

    Thank you all for the tips and advice.
  7. Volante macrumors regular

    Feb 8, 2008
    What I usually do this use the "Reset to Apache/MySQL default"-button under Preferences -> Ports. hello localhost :)
  8. myjay610 macrumors regular

    Jan 6, 2008
    Did you actually try running the MAMP application that comes with it? It lets you easily configure things like the port number, WWW root, etc. It should be in your applications folder.

Share This Page