The book "The Joy of PHP" teaches you how to write interactive web applications using PHP, Apache, and mySQL. There are two basic options for running the AMP stack on your computer:
1. Run Apache, mySQL, and PHP as local services on your computer.
2. Run Apache, mySQL, and PHP inside a Docker container running on your computer (recommended).
If you decide to use Docker, the source code for the book includes a dockerfile (for the container which will run Apache and PHP) and a docker-compose.yml file which defines the other two containers you need. This video shows the Docker containers in action and explains how they work.
Docker Containers
Although it was not an option at the time I first wrote this book, I now recommend that you run all this stuff inside a container running on a virtual machine. It really isn’t as scary as it seems and I think you’ll be pleasantly surprised at how easy it is. There is a product called “Docker” which makes it all very easy. Basically the idea is to create a self contained unit (the “container”) into which you install Apache, mySQL, and PHP. When you want to play with this stuff you start up the container and it just works. When you are done you stop the container and your computer will be just as it was before. To run containers you need to download and install Docker Community Edition. Fortunately this tool is free to use and is available for most types of computers, including Mac and Windows. You can get it from http://www.docker.com