Setting Up: Free PHP & MySQL Tutorial
Master PHP and MySQL development environment setup
Before starting this tutorial, ensure you have downloaded the class files and have either MAMP PRO (Mac) or XAMPP (Windows) installed on your system.
Setup Components
Class Files Organization
Learn how to properly structure and place your PHP files in the web server directory for optimal development workflow.
Error Display Configuration
Configure MAMP PRO to show PHP errors during development, making debugging and troubleshooting much easier.
Development Server Options
| Feature | MAMP PRO (Mac) | XAMPP (Windows) |
|---|---|---|
| Installation Path | Applications/MAMP | C:/xampp |
| Web Root Directory | htdocs | htdocs |
| Error Display Default | Hidden | Hidden |
File Setup Process
Locate Class Files
Navigate to Desktop > Class Files and select the phpclass folder containing all tutorial materials
Copy Files
Use Cmd-C (Mac) or Ctrl-C (Windows) to copy the selected phpclass folder to your clipboard
Navigate to Web Root
Go to your web server's htdocs directory - either Applications/MAMP/htdocs or C:/xampp/htdocs
Paste and Verify
Paste files with Cmd-V (Mac) or Ctrl-V (Windows) into the htdocs directory to make them accessible via web server
Files must be placed in the web server's root directory (htdocs) to function properly. PHP files outside this directory cannot be executed by the web server.
File Setup Verification
Ensures you have all necessary tutorial materials
Makes files accessible to the web server
Confirms your development environment is active
Error Display Configuration
Launch MAMP PRO
Open the MAMP PRO application to access server configuration settings
Access PHP Settings
Click the PHP tab to view and modify PHP-specific configuration options
Enable Error Display
Locate 'Log errors' section and check 'to screen' option to display errors in browser
Save and Restart
Click Save and restart the server when prompted to apply the new error display settings
Error display is disabled by default for security reasons in production environments. Always enable it for local development to facilitate debugging and learning.
Error Display Configuration
Key Takeaways