H A R V E Y
Ubuntu 16.04.4 LTS Server
Linux version 4.4.0-118-generic (buildd@lcy01-amd64-025) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) ) #142-Ubuntu SMP Wed Mar 28 18:41:44 UTC 2018
One of A.H. most popular films
How to [ Access Your Webpages ]
or [ Validate HTML ] on Harvey2
Using [ Command Line ],
[ the SSH Client ],
[ Putty ]
or [ Mac OS X ] to log-on to Harvey2
Using: [ PERL ],
[ PHP ],
[ Python ],
[ Ruby ]
or [ public_html/cgi-bin/ ] for Web Scripting
This is not a location to learn how to program in these languages,
but rather to describe what is needed to use, launch and envoke scripts
that use one of the languages mentioned above.
-- W3C --
PHP Info | MOD PHP --
Python Info | MOD Python --
PERL Info --
Ubuntu 16.04.4
Linux version 4.4.0-118-generic (buildd@lcy01-amd64-025) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) ) #142-Ubuntu SMP Wed Mar 28 18:41:44 UTC 2018
## Access Your Web Pages
Harvey2 can be used for testing Linux versions of mySQL, PERL, PHP, Python, Ruby as well as displayng web pages
Use the Linux Apache server on harvey2 replacing the typical bingweb with harvey2:
http://harvey2.cc.binghamton.edu/~<your user-id>
[ TOP ]
## Using Command Line to log-on to Harvey2
- You must have a valid bingsuns account that works on a PODS lab machine and BingSuns.
- Either command line ssh client components installed on Windows OR be starting on a Linux or Unix machine
ssh -X <your user-id>@harvey2.cc.binghamton.edu
- The -X will allow you to run X-applications on Harvey2, IF you are coming from a Linux box and possible a Mac.
ON a windows computer you will need an X client running to start X-apps.
[ TOP ]
## Using the SSH Client to log-on to Harvey2
If you don't already have it, install the
SSH client
for windows supplied by BU.
Or install an SSH package on your linux machine.
- Click on the SSH icon :
Click on the Quick Connect button :
Enter harvey2.cc.binghamton.edu | in the Host Name: entry point |
Enter your user-id | in the User Name: entry point |
Enter 22 | in the Point Number: entry point (it should be there already) |
Select Password | in the Authentication Method entry point (if it is not already selected) |
Click on the Connect button :
You will get a warning screen the first time in.
Hit the Yes button
- You will see the SSH issue/message screen
Click on the OK button :
- Enter your password and click on the OK button :
- You should be logged in to your account.
These are simple directions to guide you to log in for the first time. There are many other features
and functions in the SSH client that you can learn and explore. In particular the FTP part of the client.
This is essential to transferring files. You can also save login and ftp configurations for later use
that will not require filling all the information in over and over again.
[ TOP ]
## Using Putty to log-on to Harvey2
If you don't already have it, install the
PUTTY
windows application supplied by BU.
There are several SSH GUI's in Linux.
- Click on the Putty icon :
The Putty screen will appear:
- Enter harvey2.binghamton.edu in the box under Host Name (or IP Address) and
Click on the Open button :
- You will get a security screen the first time in.
If the numbers match you should be OK, Hit the Yes button:
- Enter your user-id followed by the keyboard [Enter] key then
Enter your password again followed by the keyboard [Enter] key.
You should now be logged into harvey2.
Putty has many features and functions you can learn that will allow you to save login's
and customise your environment.
These are simple instructions to help you with your first log in.
[ TOP ]
Mac OS X Links
[ TOP ]
## Using PERL for Web Scripting
- This will use mod_perl to execute code. Many references can be found on-line
- No magic line (#!/usr/bin/perl) should be used.
- A .pl extention should be used.
- These should not be in the cgi-bin directory.
[ TOP ]
## Using PHP for Web Scripting
This can be done two ways, using mod_php or using php as a cgi script.
- mod_php
- A script can be all PHP or embedded in HTML.
- A magic line (#!/usr/bin/php) should be used,
If a magic line is used it will be treated as part of the text.
- A .php extention must be used.
- A php script can be placed in your public_html file structure.
- Calling a php script by the name of a php function can have unexpected results, or not.
- php as a cgi script
- A magic line (#!/usr/bin/php-cgi) must be used.
- It is a good practice to use a .cgi extention on these scripts. [[editors note: JH says this is a lie.]]
- The file must be executable (chmod u+x <filename>.php)
- A script can be all PHP or embedded in HTML.
- It is a good practice to keep .cgi scripts in your cgi-bin directory.
[ TOP ]
## Using Python for Web Scripting
Python currently should only be used in cgi-bin scripts.
[ TOP ]
## Using Ruby for Web Scripting
- This will use mod_ruby to execute code. Many references can be found on-line
- No magic line (#!/usr/bin/ruby) should be used.
- A .cbx extention should be used.
- These should not be in the cgi-bin directory.
[ TOP ]
## public_html/cgi-bin
- Scripts for any installed language, as a good practice, should be in your cgi-bin directory under your public_html directory.
~<youruserid>/public_html/cgi-bin
- Typically and as a good practive use a .cgi extention.
- A magic line must be at the top of the script to indicate which and where the language
executable is located.
The following are correct magic line's for Harvey2.
- #!/usr/bin/perl # current version 5.10
- #!/usr/bin/php # current version 5.2
- #!/usr/bin/python2.3
- #!/usr/bin/python2.5 # current default
#!/usr/bin/python # uses default
- #!/usr/bin/python3.0
- #!/usr/bin/ruby1.8 # current default
#!/usr/bin/ruby1.8 # uses default
- #!/usr/bin/ruby1.9
- The script needs only and should only be executable for user.
chmod u+x <filename>.cgi
chmod go-x <filename>.cgi
- Files can be written from a script.
[ TOP ]
## Validate HTML
- Go to : http://validator.w3.org/

Mouse click the [ Check ] button to validate the HTML for the page entered.

Mouse click the Validation Output jump to link to review the errors.

Make corrections to your page with the editor you prefer.
As you make corrections reload the page by
Hitting the back button to go back to step 3 and hitting the [ Revalidate ] in the lower right of the page.

Mouse click the Validation Output jump to link to review the new set of errors.
Continue this process till the screen below appears.

Click on the Congratulations Icons link to get the HTML to add the W3C Valication Icon to your page.
[ TOP ]
Thu Apr 19 13:16:50 EDT 2018