Tags

    MAMP module

    Team,
    This week, we move from microcomputers like the Raspberry Pi to full scale web servers using apache, like in the Pi.
    Our platform is called MAMP:
    Macintosh (a type of apple)
    Apache (a web server)
    MySQL (a database program)
    PHP (a database to web portal program)

    We'll begin with MAMP setup on your laptops.
    Find the following two folders in your Applications folder on the hard drive:
    MAMP
    MAMP PRO
    Open the one called MAMP PRO and open the MAMP PRO application.
    This should start the web server.
    If you don't have admin access, see your instructor
    There are two important folders you need to know about, in the MAMP folder:
    htdocs (where your web documents are stored)
    cgi-bin (where your scripts will be stored)
    We will be learning how to use cgi scripts, which are programs that link web pages to data, like forms, online shopping and so on.
    Our text for this is cgi101, which can be found online here:
    http://www.cgi101.com
    Or you can download the text here:
    http://physics.hpa.edu/physics/act/pdf/cgi101_ebook.pdf

    Here are our steps:
    1. Open the MAMP Pro folder
    2. Start MAMP pro, and make sure to check the button "Start Apache and MySQL on system startup"
    3. Test your server by going to http://10.14.8.x:8888 what do you see?
    4. Create a basic index.html page and load it into the htdocs folder. Test.
    5. Test your cgi script folder by going to http://10.14.8.x:8888/cgi-bin/printenv
    6. Open the cgi101 text book
    7. Find the Programs section (after the table of contents)
    8. Look for the hello world script, click on it
    9. Try both the script link and the live test link
    10. Copy the hello world script into textwrangler (this is your first look at the computer language PERL)
    11. Save as "first.cgi" on your desktop
    12. Move this file over to the cgi-bin folder on your computer
    13. Test out your new cgi by going to htp://10.14.8.x:8888/cgi-bin/first.cgi
    14. Move on to other scripts in the text (second.cgi, third.cgi...), reading the text then testing each one
    15. Make a copy of each on your weblog

    Comments

    /groups/freshmancomputerscience/search/index.rss?tag=hotlist/groups/freshmancomputerscience/search/?tag=hotWhat’s HotHotListHot!?tag=hot0/groups/freshmancomputerscience/sidebar/HotListNo items tagged with hot.hot/groups/freshmancomputerscience/search/index.rss?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomelist/groups/freshmancomputerscience/search/?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomeRecent ChangesRecentChangesListUpdates?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcome0/groups/freshmancomputerscience/sidebar/RecentChangesListmodifiedDateallRecent ChangesRecentChangesListUpdateswiki/welcomeNo recent changes.reverse5search