General Information for COP 3832
-
On-line resources
-
General Stuff
- Review Topics for the Midterm
-
Please stop your servers on otter.aul.fiu.edu and
restart them on otter.aul.fiu.edu. You will need to change the ServerName
directive in httpd.conf to the new server.
-
Syllabi: Please note that I originally had the wrong date
for the final exam. Please check the syllabus for the correct date.
-
If you do not have a solix account, then get one:
School Accounts
-
If you don't have an ISP already, then you can connect to the internet through
the school: Requesting
a PPP account
-
Assignments will be posted here
-
Submitting Homework Online from weasel, otter or
solix
-
Submitting
homework on-line via the Web
-
Assignment 1
-
The link from the home page should be to run-hw1-isp.cgi in your
cgi-bin directory. An eraly version of the assignment had the directory
as COP3832 by mistake.
-
Assignment 2
-
Assignment 3
-
Please get a new copy of run-hw3.cgi if you copied yours before 2/15 at noon.
-
Assignment 4
-
You will need to create your own script that generates a 500 error, or copy
the one from ~tdowne99/COP3832/personal. You will not be able to run it as
I indicated in the homework, since you have disabled scripting in user
directories.
-
You may search the Apache site from this link:
http://httpd.apache.org/docs/
-
To see your error documents in Internet Explorer, you need to go to the
Tools|Options menu and turn off 'Friendly HTTP Error Messages'. Also, your
file must contain at least 512 bytes or IE will still show the 'Friendly'
messages.
-
The assignment is due before spring break.
-
If you printed a copy of the homework before
Tuesday, March 5 at 11:19 PM, then please get a new copy.
-
Assignment 5
-
Assignment 6
-
UNIX information
-
If you deleted some intialization files on otter 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.
-
Why you are getting the error: command not
found
-
See what the
form elements look like
-
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
Mon, Feb 26, 06:15 PM
-
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 otter 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,
otter 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 otter 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