General Information for COP 3832
-
On-line resources
-
General Stuff
-
Exam Info
-
Midterm: Monday, 10/10
-
Final: Monday, 12/10: 1530-1800
-
Assignments will be posted here
-
Submitting Homework Online from weasel, mongoose or
solix
-
Submitting
homework on-line via the Web
-
Assignment 1
-
Due on Wednesday 9/19 at the start of class.
-
Assignment 3
-
The assignment has been extended for 24 hours. Upload the assignment on-time,
hand in the hard copy later.
-
You may specify more than one option in the Options directive. If you omit
Indexes, then you will not be able to see the contents of a directory that
does not have a 3832.html page.
Options ExecCGI Indexes FollowSymLinks
-
Assignment 4.
-
You might find the following references helpful.
-
If you are using Internet Explorer, you will need to turn off friendly (???)
error messages:
-
Tools menu
-
Internet Options
-
Advanced
-
Uncheck "Show friendly HTTP error messages"
-
Be sure that your alias and the path do not have trailing slashes
Alias /foo /aul/homes/dlette07/COP3832/data
-
Assignment 5
-
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.
-
Miscellaneous scripts
-
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