General Information for COP 3832
-
If you do not have a solix account, then get one.
School Accounts
-
On-line resources
-
Exam Info
-
Midterm
-
Review: Monday 2/19. Bring questions. When you stop asking questions, the
review is over.
-
Exam: Wednesday 2/21.
-
Topics for the midterm
-
Final
-
Review: Wednesday 4/18. Bring questions. When you stop asking questions,
the review is over.
-
Check the UPDATED syllabus
for the exam time for your section.
-
Topics for the final exam
-
Assignments will be posted here
-
Submitting Homework Online from weasel, mongoose or
solix
-
Submitting
homework on-line via the Web
-
Assignment 1
-
Assignment 2
-
Assignment 3
-
Assignment 4
-
I have edited the scripts from the book, and replaced some of the stranger
Perl syntax with statments similar to C++ and Java statements. The scripts
are now more adaptable to the homework.
-
Remember to restart your server after making changes to any conf files.
-
Test for syntax errors in your scripts by running them from the mongoose
command prompt. For example, to test image.cgi for syntax errors,
run it with
./image.cgi
-
Why you are getting the error: command not
found
-
Be sure you change the language preferences in IE before you test it there.
The default language in IE is en-us, not en. You script only
has to recognize en.
-
Assignment 5
-
Assignment 6
-
There is extra credit worth 2 points. It is described on the Assignment 6
page.
-
Make server side includes for .shtml files and cgi scripting for .cgi
files available for every directory accessible from your server,
but only enable them in the directories described in the assignment.
-
Be sure to turn off symbolic links in the document root, so that symbolic
links only work in the link directory.
-
Add a link on the homework page to the personal page for ~tdowne01
-
Use
<LocationMatch /~.*> ... </LocationMatch>
instead of
<Location /~*> ... </Location>
to control the
user directories.
There used to be two ways to do this
<Location ~ /~.*>
and
<Location /~*>
Now these have been replaced with
<LocationMatch /~.*>
-
UNIX information
-
If you deleted some intialization files on mongoose and your prompt looks
like
>
, then issue this command from your root directory:
~downeyt/public/bin/init_user
-
More Information About Modes
-
HTML Information
-
Server Information
-
Examples of Server options
-
Server Side Include (SSI) Information
-
PERL Script Information.
-
CGI Information. Includes information
on CGILib.
-
Perl Primer. It is very basic, but it
covers the things I explained in class. Check for updates: last modified
on
-
Some PERL info: split, join, and pattern
matching
-
Scripts
from the book by chapter. I have added a few examples that I covered
as well.
-
There is a directory named scripts in my ~downeyt home directory.
You have access to it, just set up a ScriptAlias in your server to
/home/scsfac/downeyt/public/scripts/, or use my server to access it.
-
Scripts-source
on my server. This is a page that gives a double view of my public/scripts
directory. You may either view a script or execute it from this page.
-
An information page for the topics
of cookies, server push, browers pull, and file uploads. This information
can all fit into one category: modifying the headers that the server and
browser send.
-
CGI.pm
Information
-
Making forms sticky Check out this link
to see how to get form elements to retain their values
-
For accessing a database, use the string
"+<&fd"
not
"+<&=$fd"
as it is in the book. Also, the statement
to include file control should be use Fcntl ":flock"; not use
Fcntl; as it is used in some places in the book.
-
JavaScript Information
-
Miscellaneous scripts
-
General Stuff
-
Information related to accessing school resources
-
General Web Information
School Accounts
Getting a school account
As long as you are a registered student, you can have an account to use the
school's computers. This account is not needed to use the PCs in the computer
labs, but it is needed to long onto the computers with names: solix, serss1,
xlab1, servax, servms. The account that you get will give you access
to all of these computers.
To get the account, you must connect to the solix computer. When you
are prompted for a user name, type the single word (no spaces)
unixshell. You will then be asked some information like name and student
number. Then you will be given a user name and a password. Write them
down! Then you will be logged off the computer. You won't be able to
access the computers for another 24 hours, while your account is being activated.
In the future, you will use your user name and password to log onto any of
the named computers.
You may get more information about UnixShell from
http://www.fiu.edu/~aus/accounts/student.html
Changing Passwords
Once you have a school account, it is good for many computers here at FIU.
You should change your password to something other than your student number.
Changing your password on solix
From the command prompt on serss1 and solix, issue the command
passwd
in order to change your password. You will be asked for three things:
-
Your current password
-
Your new password
-
Your new password, again
Back to top of page
Many people are having difficulty getting the <P align="right"> working.
The problem is with the header tags that start the paragraphs: Do not include
the header tags inside the paragraph. Do it this way
<h1>Heading</h1>
<P align="right">
Paragraph
</P>
This will get it working. The same applies for "left" and "center".
Back to top of page
Submitting Homework Online from mongoose or solix
I have created a script that you can call from school computers to upload
files to my directory. Execute the following from your directory on weasel,
mongoose or solix:
~downeyt/cs/public/webftp/webftp.pl
and follow the instructions. Use the -h option to learn how to customize
the program.
Back to top of page
There are three types of permissions for a file or directory: read,
write, and execute.
File
-
Read: it is possible to see the contents of the file
-
Write: it is possible to change the contents of the file
-
Execute: the file contains machine code, or the file contains a script and
the name of a program to execute the script
Directory
-
Read: it is possible to see the list of names of the files that are in the
directory
-
Write: it is possible to change the list of names of the files that are in
the directory
-
Execute: it is possible to access the files that are in the directory. It
is possible to change (cd) to the directory.
Each file has three different access permissions
-
User: the owner of the file
-
Group: the group that the user belongs to. Usually, there is no such group.
-
Other: every other account that is not the user, nor the user's group
The output of the ls -al
command lists all the permissions.
There are ten characters
-
First character - type of file: d is directory, l is link, - is file
-
Next three - user permissions
-
Next three - group permissions
-
Next three - other permissions
Each permission is assigned a numeric value. The values are chosen so that
each number from 0 - 7 indicates a unique combination of permissions.
-
none: 0
-
e: 1
-
w: 2
-
we: 3
-
r: 4
-
re: 5
-
rw: 6
-
rwe: 7
To use the chmod command, determine the permissions that are required for
each category of account that can access the page: user, group, other. Calculate
the number for each category. There will be one number for each. Here are
some examples of chmod commands
-
chmod 755 public_html
-
chmod 644 index.html
-
chmod 711 ~
-
chmod 600 httpd.conf
To get more information on the chmod command, use the man pages.
-
On solix:
man -s 1 chmod
-
On mongoose and weasel:
man chmod
-
Here are the explanations of the other modes in the ls command
-
l - file locking. Only one process can access the file at one time.
-
t - sticky bit. If directory has write access, only owner of directory can
rename or remove files.
-
T - sticky bit but no access. Sticky bit is on, but directory does not have
execute permission.
-
s - set-user or set-group ID. A file or directory created will have the same
owner as the parent directory, it will not be owned by the ID of the process
creating the file or directory.
-
S - set-user or set-group ID but no access. Set-ID bit is on, but directory
does not have execute permission.
Back to top of page
There are several reasons for getting this error
-
You do not have execute permission on your script
chmod 755 script.cgi
-
The path to perl is incorrect. Be sure you have usr and not
user
#!/usr/local/bin/perl
-
You have edited your script on Windows and saved it to the U: drive, or you
have cut and pasted from a Windows machine to a telnet session on Unix. This
will add an extra character, ^M (0x13), to the end of each line. Unix will
then try to find the command
/usr/local/bin/perl^M
. There is
no such command, so you will get the command not found error. Once
the ^M is there, it cannot be deleted easily. Here are some options for fixing
this
-
I have created a script that will erase all the ^M's from a file.
~/downeyt/cs/public/bin/fixm.pl your_script.cgi
This will create a new file named newyour_script.cgi
. To see
what the old file looks like, try this
~downeyt/cs/public/bin/view.pl script.cgi
-
Open a new file using an editor on the Unix system: pico, vi, or emacs
-
pico: use ^R to include your old file into this file.
-
emacs: use ^X I to include your old file into this file.
-
vi: someone tell me how to include a file using vi.
Back to top of page