Setting Up: Free PHP & MySQL Tutorial

This exercise is excerpted from Noble Desktop’s past app development training materials and is compatible with iOS updates through 2021. To learn current skills in web development, check out our coding bootcamps in NYC and live online.

Note: These materials are provided to give prospective students a sense of how we structure our class exercises and supplementary materials. During the course, you will get access to the accompanying class files, live instructor demonstrations, and hands-on instruction.

Complete the following setup prior to beginning any exercises.

Topics covered in this PHP & MySQL tutorial:

Setting up your class files, Setting MAMP PRO to display errors

Copying the Class Files into the Web Server Folder

Throughout this workbook you will be editing class files that we have prepared for you. In order for these PHP files to run, they need to be located in the web server folder that you installed during setup.

  1. If you haven’t already, download the class files for this book. Refer to the Downloading the Class Files chapter for instructions on how to download them.
  2. Go to Desktop > Class Files.
  3. Click once on the phpclass folder to select it.
  4. Hit Cmd–C (Mac) or Ctrl–C (Windows) to copy it.
  5. Follow the appropriate Mac or Windows instructions below:

    • Mac: Go into Hard Drive > Applications > MAMP > htdocs
    • Windows: Go into My Computer > C: > xampp > htdocs
  6. Press Cmd–V (Mac) or Ctrl–V (Windows) to paste the class files.

    Now the class files are in the root directory of our active web server.

MAMP PRO: Displaying Errors

By default MAMP PRO does not display PHP errors on the page; instead it just shows a blank document. This is a good secure practice for a production site, but for local development it makes it very hard to troubleshoot your code.

  1. Launch MAMP PRO.

  2. Click the PHP tab.

  3. At the bottom, next to Log errors, check to screen.

  4. Click Save.

  5. If it asks to restart the server, click Yes.

Yelp Facebook LinkedIn YouTube Twitter Instagram