|
|||||
|
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.
LoadModule userdir_module modules/mod_userdir.so is un-commented.Listen 8080
<VirtualHost *:8080>
DocumentRoot c:/websites/santarosa.edu/student
UserDir c:/websites/santarosa.edu/student
</VirtualHost>
<Directory "c:/websites/santarosa.edu/student">
Options Indexes FollowSymLinks Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>Please be sure to leave the Listen 80
directive intact.DirectoryIndex index.php index.shtml index.html.
http://127.0.0.1:8080/~{your user name}/ .
You should get a directory listing looking like:
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: phi.ini file for editing (see page 73 of the book
for the file location).phpinfo.php".<?php phpinfo(); ?>
http://localhost:8080/~{yourusername}/2009fall/cs5513/assn01/phpinfo.php
|