Join David Gassner for an in-depth discussion in this video Using the exercise files, part of Installing Apache, MySQL, and PHP.
- This course is accompanied by exercise files that you can use to follow along on your own computer. I've copied the exercise files to my desktop, but you can place them anywhere on your hard disk. The exercise files for this course are organized by software product. There's one subfolder for each of the components of an AMP stack; Apache, MySQL, and PHP, and one subfolder for phpMyAdmin. The Apache folder contains a single file, apache_php_config.
I'll show you how to use this during the course to connect Apache and PHP together when you're working on Microsoft Windows. If you're working on Mac, you won't need this file because all the code you need is already in the files, you just have to remove a couple of comment characters. I'll show you how to do that as well. The MySQL folder contains two files. Explorecalifornia.sql is an SQL query script.
It creates tables named admin, explorers, packages, and so on. Now, I'm not actually actively using this script in the course, but it's a great script to use if you just want to quickly create a database and do some testing with it. To use this file, create a new database say in phpMyAdmin, then go to a query screen and copy and paste this code into the query screen and execute it.
You'll have an instant database to work with. The other file in this folder is called MySQLUninstallOnMac. Uninstalling MySQL on Mac OS X is a little bit complex. Oracle doesn't provide an uninstall application on Mac, so instead, you have to go to Terminal and execute all of these commands. I'll show you how to use this file when it's time. The PHP folder contains a single file named phpinfo.php and it has just a single command, phpinfo.
This command outputs information to the browser about the current PHP installation, the version, important folders and files, and so on. In some of the videos in this course, I just copy this file into place for testing. And in some other videos, I create this code from scratch. But this file is here if you need it. Because it's just a PHP script, it'll work on all operating systems that support PHP. And finally, phpMyAdmin includes a single file named config.inc.php.
This is an example of how to set up a simple set of credentials using phpMyAdmin. It defines a single server and assigns the user and password. I have a very easy to guess password here named password, but if you choose a different password, you can put your password in here. There's also an important configuration item here that will let you delete or drop databases from within phpMyAdmin. In some phpMyAdmin installations, you'll already have this capability.
But if you go into the Operations pane in phpMyAdmin, and you don't see the ability to drop or delete a database, adding this line of configuration will add it back in. I'll show you how to use this file in the chapter on installing and using phpMyAdmin. So those are the exercise files. Because we update this course regularly, every once in a while you'll see that new exercise files have been added here. But I'll describe what they are and how to use them in the videos where I demonstrate their use.
- Installing Apache, PHP, and MySQL separately
- Activating Apache and PHP on Mac OS X
- Installing and configuring phpMyAdmin
- Installing WampServer
- Installing MAMP
- Configuring MAMP's Apache and MySQL server ports
- Installing XAMPP for Windows and Mac OS X
- Managing MySQL security through XAMPP
- Installing Bitnami for Windows and Mac
- Detecting and handling port conflicts
- Working with Apache and IPv6 in Windows 8