This page details what you need to do to get your Journal up and running.
First step, log onto the system and change into your public_html/ subdirectory:
Next, create a directory corresponding to the course number you are taking (using all capital letters). For example, if your course is CSCS1730 UNIX/Linux Fundamentals, you're after the "CSCS1730". So let's make it:
Under that, create a journal/ subdirectory:
Finally, set appropriate permissions for all relevant directories to allow for web content to be accessed:
Your directory structure is now in place for your journal; You can now proceed with setting up your journal files and creating journal content.
We're going to be using PHP to facilitate some of our tasks related to the class journal. Don't worry, I don't expect you to know PHP- I'll be providing you with all the code you need.
First up, change into the journal subdirectory of your class subdirectory of your public_html subdirectory:
Create, using your favorite text editor (or something like nano, if you have not yet been enlightened to the ways of vi), a file called intro.php, and put in some information about yourself (no need to use any body or other structural HTML tags-- just stuff like paragraph, image, hr, etc.). Save and exit to the command-line.
Next, create a file called index.php and put the following inside of it:
<!-- begin index.php -->
<html>
<head>
<title>Your Name's CSCS1730 UNIX/Linux Journal</title>
</head>
<body>
<?php
include "/var/public/unix/week.php";
include "intro.php";
for($i = 1; $i <= $week; $i++)
{
if(file_exists("week$i.php"))
{
echo "<hr />";
include "week$i.php";
}
}
?>
</body>
</html>
<!-- end index.php -->
Save, and exit back to the prompt. You're almost there!
Set appropriate permissions on the files to be viewed:
All you need to do now is create journal content each week!
Each week, you are to create a new file to store that week's journal entries. The files will take the form week1.php, week2.php, week3.php, etc. up the line. In each week's file, use paragraph tags and other HTML content tags (again, no need for BODY or other full-document tags) to create your entry.
Be sure your weekly journal files are stored in your ~/public_html/CSCS1730/journal/ directory, and when done, be sure to set the following permissions on all PHP files in that directory:
If you do that, everything should work, and you can view your journal from the following URL:
Be sure to substitute your actual Lab46 username in place of "username", and of course your actual course number should CSCS1730 not be the course in question.
If you forget to run the chmod command to set 644 permissions, you are likely to get 403 Forbidden messages or other problems when trying to view your journal.
| This page is lovingly handcrafted in vim. | Last Updated: 08/24/2008 |