Preparing for the ZF2 Tutorial at PHPNW12 – Rob Allen's DevNotes


If you are coming to the ZF2 tutorial at PHPNW12, then you will get the best out of it if you do a little preparation before you arrive.


You should bring a laptop with the following working on it:

  • A web server (preferably Apache) running PHP 5.3.3 or higher
  • A working MySQL server along with an administration tool such as phpMyAdmin
  • A text editor or IDE that you're comfortable coding with

Vhost set up

You should set up the following directory structure somewhere that Apache can access:

Set up 6 virtual-hosts so that you can access the public folder within each directory like this:

URL DocumentRoot
http://albums.localhost /path/to/phpnw12/albums/public
http://ex1.localhost /path/to/phpnw12/ex1/public
http://ex2.localhost /path/to/phpnw12/ex2/public
http://ex3.localhost /path/to/phpnw12/ex3/public
http://ex4.localhost /path/to/phpnw12/ex4/public
http://skeleton.localhost /path/to/phpnw12/skeleton/public

Place a working copy of the ZendSkeletonApplication in /path/to/phpnw12/skeleton.

Place a working copy of the ZF2 albums tutorial in /path/to/phpnw12/albums. Follow the tutorial in order to get it working.

Once you have both the skeleton and the albums application working, then you are ready for the tutorial and we'll see you on Friday!