Setting Up: Free PHP & MySQL Tutorial

Learn how to properly set up your class files and configure MAMP PRO to display errors in this comprehensive 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.

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.

SQL Bootcamp: Live & Hands-on, In NYC or Online, Learn From Experts, Free Retake, Small Class Sizes,  1-on-1 Bonus Training. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

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.

Noble Desktop Publishing Team

The Noble Desktop Publishing Team includes writers, editors, instructors, and industry experts who collaborate to publish up-to-date content on today's top skills and software. From career guides to software tutorials to introductory video courses, Noble aims to produce relevant learning resources for people interested in coding, design, data, marketing, and other in-demand professions.

More articles by Noble Desktop Publishing Team

How to Learn Full-Stack Web Development

Master full-stack web development with hands-on training. Build fully functional websites and applications using HTML, CSS, JavaScript, Python, and web developer tools.

Yelp Facebook LinkedIn YouTube Twitter Instagram