PHP scripts location

Discussion in 'Mac Programming' started by cossie, Jun 23, 2008.

  1. cossie macrumors member

    Aug 8, 2006

    I've been trying to learn PHP, MySQL and SQLite and I've been doing so using a unix account in my Uni, unfortunately it's going to be offline for a while for hardware upgrades.

    So I got MAMP to let me work on this stuff from my laptop (MBP running Tiger). Unfortunately, I'm not sure where I should be saving my PHP scripts so that they can access the database tables I've created using MAMP.

    I know there's a Library/WebServer folder but when I try to save the files there the PHP scripts don't run when opened in a browser (even simple HelloWorld type stuff).

    I can http://localhost:8888/ but it's empty, rather than saving files all over the place I thought I'd ask here if anyone has any advice, help or tutorials.

    Thanks :)
  2. a456 macrumors 6502a


    Oct 5, 2005
    When you download MAMP you get a dashboard widget installed. Use this to start servers and open start page.

    Save PHP files to htdocs folder. Make sure MAMP folder is located in Applications. Use http://localhost:8888/ and you should see a file list.

    I'm learning myself very slowly and so haven't got a grip on the MySQL stuff yet but it would be great to hear from others on this.

    I tried installing Locked Area Lite on MAMP but haven't had any luck as yet with that - I think I was trying to run before I could walk.
  3. cossie thread starter macrumors member

    Aug 8, 2006
    Thanks a456 that worked perfectly.

    My scripts are able to access the MySQL db that I created too - MAMP is a fantastic application.

Share This Page