CS 199 Willamette University Spring, 2019
 
Programming in PHP, Databases with MySQL,
and Web Applications
 

Accessing the cs-199 Server

For CS199, HTML. CSS, and PHP must be placed on cs-199.willamette.edu, in order to be run appropriately. Work on this server may involve

In practice, access to these files and directories proceeds in different ways for these two types of work.

Placing Files for Web Access

In order for a file for the course to be accessed over the Web, it must be copied to the cs-199.willamette.edu server. The specific location for the file depends upon context.

The process for both locations is largely the same, with a simple adjustment in specifying a directory. The steps below apply to Mac OS X computers (e.g., those in the classroom). Steps for Windows machines are similar (but see WITS for details).

Accessing Files to Run PHP

If a PHP file contains a syntax or otherwise encounters an error when it is run, the entire PHP environment crashes, and the Web browser likely shows a blank screen. Unfortunately, this blank screen indicates that something is wrong, but provides little insight regarding the nature of the problem or how to fix it.

Fortunately, many issues of syntax and simple processing may be identified by running the file with PHP directly, separate from a browser. Steps for this work follow.

When you run the program, you do not have access to any data typed into a form, so any fields from a form are considered blank. This lack of data may not help you in examining output from a form. However, in trying to run the program, the php command will print any identified errors in program syntax. A few additional issues also may be found (e.g., the program is trying to access a file that does not exist). Once you know that the program is syntactically valid, then you can work with the program in a browser to check actual processing.



created 6 February 2019
revised 6 February 2019
Valid HTML 4.01! Valid CSS!