CS 55.13 - PHP Programming
Section 4191
David Pearson
Fall 2009

Exercise 01.01

Preparing your Development Environment

During the course of this class you will be using two different PHP environments. The first is your development environment, this is where you will do the exercises from the book and prepare your homework programming assignmnets. Your second environment, production, will be where you upload your assignments for grading.

Most companies use a multi-environment set up. Code gets developed on individual programmer's machines, then integrated with other's work, then the Quality Assurance engineers need to ensure the application performs its functions correctly, the application needs to be analyzed to ensure it performs well when it is being used by a large number of users and finally the application gets installed in the "production" environment for end users to access it.

Typical environments found in professional development:

Not all companies use all of these environments, some will use additional. At my current company we use the development, quality assurance and production environments. When I worked for Charles Schwab, we used all five of those listed above.


The goal of the set up of your development environment is to mimic the design of the production environment. In this you will be getting MySQL, Apache and PHP installed and then configuring it. The following instructions will result in a working development environment.

Start by following the text book's instructions to install MySQL, Apache and PHP (Chapters 1-4). If you are using Windows Vista, I recommend that you diable User Account Control before editing the httpd.conf or php.ini files, this will save you a lot of headaches. See Disable User Account Control (UAC) the Easy Way on Windows Vista for how to do it or Google "disable user account control" Then follow these instructions to customize your environment.

  1. Create your user directory
  2. Configure the Apache server
  3. Open a browser and load the URL: http://127.0.0.1:8080/~{your user name}/ . You should get a directory listing looking like: sample directory listing
  4. Now you will create individual project directories for each of the assignments for class.
  5. First create a "2009fall/cs5513" folder in your user directory.project directory
  6. Then in the "cs5513" create a folder for each assignment, named "assn01" through "assn18".assignment directories
  7. When you work on your homework assignments, use the associated directory.
  8. Point yout browser to http://127.0.0.1:8080/~{your user name}/2009fall/cs5513/ (please note that in some of these screen shots, I'm using port 9010, it's because I have another server already using port 8080) and you should see something like this: web assignment directories
  9. Take a screen shot of your browser, you will turn it in as part of your homework.
  10. Now we will fine tune your PHP configuration.
  11. Final testing of your development environment.