CS 55.13 - PHP Programming
Section 4191
Davids Yahoo! Messenger status David Pearson
Fall 2010

CS 55.13 - PHP Programming

Section 4191 - ONLINE

Updated at: December 10, 2010 8:17 am

Week 1 - 16 Aug 2010 ¶ Topic: Introduction
 

Welcome aboard! This is the web page that you'll find all of the reading, videos, exercises and assignments. Unless I otherwise notify you, the information posted for each week will not change after the week begins. You'll notice that I've added a time stamp at the top of this page to let you know when the last time the page was updated.

Our weekly schedule will begin each Monday with the assigned homework being due the following Tuesday (that's 1 week + 1 day).

As part of your homework each week, you will create a multiple-choice test question from each chapter of the book (except Chapter 1). The test questions you write may be on the mid-term or final exam.

A "feature" of the Test Question Submission Tool is that it will only let specified email addresses through. I will add each of your email addresses to the list. I will pull them from the class roster and from the CATE system (the system you perform the Check-In on). You will know that your email address is on the list when you see your grade appear for the Check-In assignment.

The majority of this week is administrative tasks and getting your PHP environments set up and prepared to develop code. Please read the book, watch the videos and perform the exercises, BEFORE you begin the homework.

The class Message Board is for you to pose PHP questions for me or one of your classmates to answer. If I receive a PHP question via private email, I will post it on the message board for everyone's benefit. Private email should be reserved for personal correspondence such as grade inquiries.

Please note you have join the Yahoo Group and I have to accept you into the group before you can write your introduction. Please include your name when you submit the request to join.

The Grades page is where you will find the most up-to-date information about your grades. If I deduct points from an assignment, I will explain why and how to improve your code for next time. If your programming assignment submission does not meet the requirements that I have set forth, I will ask you to fix the problem and re-submit the assignment, I will deduct 10% for each re-submission. When I grade assignments in this class, I will be focusing on the PHP code, but I still expect to see well written and valid HTML.

The Gallery section of the class web site is where you'll be able to take a look at other students' work. I have set up a "source code viewer" so you can actually see the PHP code others have written. I expect you to respect the work that your fellow students have done in their homework. Do not copy someone else's solution. I will be looking at each person's code and will be on the lookout for plagiarism. Use other people's code as a source for inspiration of ideas on how to solve a problem.

Please report errors on this web site to me. I will try to fix them as soon as possible. Most of the text you see on the class web site is written without the help of a spell checker, so I'm sure there are errors.

Please perform the software installs as directed in this week's reading. Please note that the book is a couple of years old and it specifies older versions of the software. The version of Apache and MySQL is not critical for our class, but the version of PHP is critical. If you are not using installers from the book's CD, please make sure you are using PHP 5.2.x (5.2.14 is the current version of PHP 5.2). Do not use PHP 5.3, it is not compatible with the code in the book. Lastly, the version of PHP on the Student Server is 5.1.6, it is older, but it should not cause any issues with our assignments.

 
Reading ¶
  • Chapter 1 - Installation QuickStart Guide
  • Chapter 2 - Installing and Configuring MySQL
  • Chapter 3 - Installing and Configuring Apache
  • Chapter 4 - Installing and Configuring PHP
Videos ¶
  • Video Lesson 1 - Getting to Know PHP
Exercises ¶
Homework ¶
     •  Check-in (A.01.01) Due: 24 Aug 2010 5 points
     •  Introductions (A.01.02) Due: 24 Aug 2010 5 points
     •  Proof of working development environment (A.01.03) Due: 24 Aug 2010 10 points
     •  Proof of Student web server account setup (A.01.04) Due: 24 Aug 2010 10 points
     •  Chapter 2 - Test Question (A.01.05) Due: 24 Aug 2010 1 points
     •  Chapter 3 - Test Question (A.01.06) Due: 24 Aug 2010 1 points
     •  Chapter 4 - Test Question (A.01.07) Due: 24 Aug 2010 1 points

Week 2 - 23 Aug 2001 ¶ Topic: Basic PHP
Reading ¶
  • Chapter 5 - The Building Blocks of PHP
  • Chapter 6 - Flow Control Functions in PHP
Videos ¶
Homework ¶
     •  Chapter 5 - Test Question (A.02.01) Due: 31 Aug 2010 1 points
     •  Chapter 6 - Test Question (A.02.02) Due: 31 Aug 2010 1 points
     •  Variables and Control Structures (A.02.03) Due: 31 Aug 2010 10 points

Week 3 - 30 Aug 2010 ¶ Topic: Functions and Arrays
Reading ¶
  • Chapter 7 - Working with Functions
  • Chapter 8 - Working with Arrays
Videos ¶
Homework ¶
     •  Chapter 7 - Test Question (A.03.01) Due: 08 Sep 2010 1 points
     •  Chapter 8 - Test Question (A.03.02) Due: 08 Sep 2010 1 points
     •  Functions and Arrays (A.03.03) Due: 08 Sep 2010 10 points

Week 4 - 06 Sep 2010 ¶ Topic: Object, Strings and Dates
Reading ¶
  • Chapter 9 - Working with Objects
  • Chapter 10 - Working with Strings, Dates, and Time
Videos ¶
Homework ¶
     •  Chapter 9 - Test Question (A.04.01) Due: 14 Sep 2010 1 points
     •  Chapter 10 - Test Question (A.04.02) Due: 14 Sep 2010 1 points
     •  Objects, Strings, Dates and Times (A.04.03) Due: 14 Sep 2010 10 points

Week 5 - 13 Sep 2010 ¶ Topic: Forms and Persistent Data
Reading ¶
Videos ¶
Homework ¶
     •  Chapter 11 - Test Question (A.05.01) Due: 21 Sep 2010 1 points
     •  Chapter 12 - Test Question (A.05.02) Due: 21 Sep 2010 1 points
     •  Forms and Persistent Data (A.05.03) Due: 21 Sep 2010 10 points

Week 6 - 20 Sep 2010 ¶ Topic: Files, Directories and Imagess
 

For the work with images in Chapter 14, you will need to have the graphics library activated. First, inspect the phpinfo() output (use the phpinfo.php file you created in Assignment 1) on your local machine, search for the string "gd". If you see a display similar to this screen shot, then the library is already activated. If you do not see this, follow the instructions on pages 270 and 271 to activate the graphics library.

The book's instructions are not sufficiently clear for setting the extension_dir directive in the php.ini. It should point to the ext directory under your PHP install directory. For example, in my environment, it is set to C:\php-5.2.14-Win32\ext\. Make sure your's is set correctly or PHP won't be able to find the php_gd2.dll.

 
Reading ¶
  • Chapter 13 - Working with Files and Directories
  • Chapter 14 - Working with Images
Videos ¶
  • Video Lesson 17 - Filesystem Access
  • Video Lesson 18 - Host Program Execution
Homework ¶
     •  Chapter 13 - Test Question (A.06.01) Due: 28 Sep 2010 1 points
     •  Chapter 14 - Test Question (A.06.02) Due: 28 Sep 2010 1 points
     •  Files, Directories and Images (A.06.03) Due: 28 Sep 2010 10 points

Week 7 - 27 Sep 2010 ¶ Topic: Database Operations, part 1
Reading ¶
  • Chapter 15 - Understanding the Database Design Process
  • Chapter 16 - Learning Basic SQL Commands
Videos ¶
  • Video Lesson 19 - Using a MySQL Database
  • Video Lesson 20 - Database Administration
Homework ¶
     •  Chapter 15 - Test Question (A.07.01) Due: 05 Oct 2010 1 points
     •  Chapter 16 - Test Question (A.07.02) Due: 05 Oct 2010 1 points
     •  Database Setup and Basic SQL Commands (A.07.03) Due: 05 Oct 2010 10 points

Week 8 - 04 Oct 2010 ¶ Topic: Database Operations, part 2
Reading ¶
  • Chapter 17 - Using Transactions and Stored Procedures in MySQL
  • Chapter 18 - Interacting with MySQL Using PHP
Homework ¶
     •  Chapter 17 - Test Question (A.08.01) Due: 12 Oct 2010 1 points
     •  Chapter 18 - Test Question (A.08.02) Due: 12 Oct 2010 1 points
     •  Using PHP and MySQL together (A.08.03) Due: 12 Oct 2010 10 points

Week 9 - 11 Oct 2010 ¶ Topic: Midterm Exam
 

The Midterm Exam will open at 12:01 AM October 11th and close at 11:59 PM October 19th. The exam may not be taken late. You may take the exam any time during the week (8 days). You will only be able to access the exam once. Once you start, you must finish it during that session. I expect you to complete it in less than 2 hours, but you will have a maximum of 3 hours to submit it after you first start it. Do not navigate away from the exam page during the exam. Do open additional browser tabs/windows to look things up on the internet.

The midterm will require you to login to the school's CATE system ( http://online.santarosa.edu/ ) in order to access the exam. Please make sure in advance that you have your username and password.

The exam is worth 100 points. The exam will be 100 multiple choice questions. All questions will have a single answer. Always assume that there are no typos on the exam and what is present is meant to be that way.

The exam is open notes, open book, open internet, open PHP manual ( http://php.net/ ), open MySQL Manual ( http://dev.mysql.com/doc/refman/5.0/en/ ), open Apache Manual ( http://httpd.apache.org/docs/2.2/ ), open Google, closed classmate/neighbor/friend. Do not ask anyone else for help on the exam. I do expect you to use your development and Student Server environments to test code. You will not find all of the answers in the book, in some cases you will need to refer to the online resources. However, I do not intend for you to research and test every single question.

If you come across a question that you have "issues" with, please make a note of it and email me all of your "issues" in a single email. Please make sure you indicate the question number.

This is the second time I have used this computer system ( http://online.santarosa.edu/ ) to administer an exam. Please report any problems immediately.

The online system is just your answer sheet, on that answer sheet you will find a link to a PDF with the questions in it. I recommend that you right click on the link to the PDF and save the PDF to your desktop, then open the PDF from your desktop. Remember: Do not navigate away from the exam page.

WARNING EXAM SYSTEM SERVER DOWN TIME At 3:05 am every morning the server will be unavailable for approximately five minutes during our daily back-up procedures. In addition, the hours between 5:00 pm and 8:00 pm on Friday evenings are always reserved for system maintenance. Most of the time this maintenance will not affect use of the system by students and instructors, but occasionally there will be a temporary outage during that period. Please plan your online schedule accordingly.

 
Homework ¶
     •  Midterm Exam (A.09.01) Due: 19 Oct 2010 100 points

Week 10 - 18 Oct 2010 ¶ Topic: PHP Applications, part 1
 

This week you will begin a project that will continue until the end of the semester. The video linked below provides an overview of the components that make up a blog.

Each week you will build a new component, at the end of the semester you will have a working basic Blog application.

This week you will design and script the database. Use the SQL scripts I provided in Assignment 7 as an example of how to create SQL scripts.

 
Reading ¶
  • Chapter 19 - Managing a Simple Mailing List
  • Chapter 20 - Creating an Online Address Book
  • Chapter 21 - Creating a Simple Discussion Forum
Videos ¶
Homework ¶
     •  Chapter 19 - Test Question (A.10.01) Due: 26 Oct 2010 1 points
     •  Chapter 20 - Test Question (A.10.02) Due: 26 Oct 2010 1 points
     •  Chapter 21 - Test Question (A.10.03) Due: 26 Oct 2010 1 points
     •  Blog Database Design and Implementation (A.10.04) Due: 26 Oct 2010 10 points

Week 11 - 25 Oct 2010 ¶ Topic: PHP Applications, part 2
Reading ¶
Homework ¶
     •  Chapter 22 - Test Question (A.11.01) Due: 02 Nov 2010 1 points
     •  Chapter 23 - Test Question (A.11.02) Due: 02 Nov 2010 1 points
     •  Blog Home Page and Posting Detail Page (A.11.03) Due: 02 Nov 2010 10 points

Week 12 - 01 Nov 2010 ¶ Topic: PHP Applications, part 3 & User Authentication
Reading ¶
  • Chapter 24 - Creating a Simple Calendar
  • Chapter 25 - Restricting Access to Your Applications
Videos ¶
  • Video Lesson 15 - User Authentication
Homework ¶
     •  Chapter 24 - Test Question (A.12.01) Due: 09 Nov 2010 1 points
     •  Chapter 25 - Test Question (A.12.02) Due: 09 Nov 2010 1 points
     •  Blog Post (A.12.03) Due: 09 Nov 2010 10 points

Week 13 - 08 Nov 2010 ¶ Topic: Logging, Localization & XML
Reading ¶
  • Chapter 26 - Logging and Monitoring Web Server Activity
  • Chapter 27 - Application Localization
  • Chapter 28 - Working with XML
Homework ¶
     •  Chapter 26 - Test Question (A.13.01) Due: 16 Nov 2010 1 points
     •  Chapter 27 - Test Question (A.13.02) Due: 16 Nov 2010 1 points
     •  Chapter 28 - Test Question (A.13.03) Due: 16 Nov 2010 1 points
     •  Restricted Access (A.13.04) Due: 16 Nov 2010 10 points

Week 14 - 15 Nov 2010 ¶ Topic: Performance Tuning, Virtual Hosting and Secure Web Servers
Reading ¶
  • Chapter 29 - Apache Performance Tuning and Virtual Hosting
  • Chapter 30 - Setting Up a Secure Web Server
Videos ¶
  • Video Lesson 24 - PHP Security
Homework ¶
     •  Chapter 29 - Test Question (A.14.01) Due: 23 Nov 2010 1 points
     •  Chapter 30 - Test Question (A.14.02) Due: 23 Nov 2010 1 points
     •  Reader Comments (A.14.03) Due: 23 Nov 2010 10 points

Week 15 - 22 Nov 2010 ¶ Topic: Optimization
Reading ¶
  • Chapter 31 - Optimizing and Tuning MySQL
  • Chapter 32 - Software Upgrades
Homework ¶
     •  Chapter 31 - Test Question (A.15.01) Due: 30 Nov 2010 1 points
     •  Chapter 32 - Test Question (A.15.02) Due: 30 Nov 2010 1 points
     •  Archive Display (A.15.03) Due: 30 Nov 2010 10 points

Week 16 - 29 Nov 2010 ¶ Topic: Error Handling & PHP Configuration
Reading ¶
Videos ¶
  • Video Lesson 22 - Error Handling and Debugging
  • Video Lesson 23 - PHP Configuration
Homework ¶
     •  Tagging (A.16.01) Due: 07 Dec 2010 10 points

Week 17 - 06 Dec 2010 ¶ Topic: PHP at the command line & PEAR
Reading ¶
Videos ¶
  • Video Lesson 21 - Running PHP on the Command Line
  • Video Lesson 25 - Using Pear
Homework ¶
     •  XML - RSS feed and RSS Parsing (A.17.01) Due: 15 Dec 2010 10 points

Week 18 - 13 Dec 2010 ¶ Topic: Final Exam
 

All homework needs to be turned in by midnight Friday December 17th.

The Final Exam needs to be completed by midnight Friday December 17th. I want to allow everyone a full week with the Final Exam so I will make the exam available starting Friday December 10th.

The exam has 100 questions on it. It covers Chapters 19-28 of the book and Video lessons 15-25. Chapters 29-32 of the book will NOT be on the exam.

The Midterm Exam will open at 12:01 AM December 10th and close at 11:59 PM December 17th. The exam may not be taken late. You may take the exam any time during the week (8 days). You will only be able to access the exam once. Once you start, you must finish it during that session. I expect you to complete it in less than 2 hours, but you will have a maximum of 3 hours to submit it after you first start it. Do not navigate away from the exam page during the exam. Do open additional browser tabs/windows to look things up on the internet.

The midterm will require you to login to the school's CATE system ( http://online.santarosa.edu/ ) in order to access the exam. Please make sure in advance that you have your username and password.

The exam is worth 100 points. The exam will be 100 multiple choice questions. All questions will have a single answer. Always assume that there are no typos on the exam and what is present is meant to be that way.

The exam is open notes, open book, open internet, open PHP manual ( http://php.net/ ), open MySQL Manual ( http://dev.mysql.com/doc/refman/5.0/en/ ), open Apache Manual ( http://httpd.apache.org/docs/2.2/ ), open Google, closed classmate/neighbor/friend. Do not ask anyone else for help on the exam. I do expect you to use your development and Student Server environments to test code. You will not find all of the answers in the book, in some cases you will need to refer to the online resources. However, I do not intend for you to research and test every single question.

If you come across a question that you have "issues" with, please make a note of it and email me all of your "issues" in a single email. Please make sure you indicate the question number.

This is the second year I have used this computer system ( http://online.santarosa.edu/ ) to administer an exam. Please report any problems immediately.

WARNING EXAM SYSTEM SERVER DOWN TIME At 3:05 am every morning the server will be unavailable for approximately five minutes during our daily back-up procedures. In addition, the hours between 5:00 pm and 8:00 pm on Friday evenings are always reserved for system maintenance. Most of the time this maintenance will not affect use of the system by students and instructors, but occasionally there will be a temporary outage during that period. Please plan your online schedule accordingly.

So, again the Final Exam will open on Friday December 10th and close at midnight Friday December 17th.

 
Homework ¶
     •  Final Exam (A.09.01) Due: 17 Dec 2010 100 points

Valid XHTML 1.0 Strict Valid CSS!