perl scripts, installing cgi scripts
art studios graphic artists design resource
perl scripts, installing cgi scripts
  HOME | CONTENT | RESOURCES | HELPA Member of the Neotrope® Interactive Network 
perl scripts, installing cgi scripts
graphic arts photoshop using photoshop
perl scripts, installing cgi scripts
  Digital Author - the online magazine for creators of digital content
digital authoring
graphic arts photoshop using photoshop
perl scripts, installing cgi scripts
 
SEARCH
perl scripts, installing cgi scripts
perl scripts, installing cgi scripts
perl scripts, installing cgi scripts
Images on this site were compressed using e-Vue MPEG4 technology in 2001, which was groundbreaking at the time for its DRM component and higher compression than JPG, however e-Vue is no more — we are transitioning these images to JPEG for 2004.
perl scripts, installing cgi scripts
web works articles

Home > Web Works > Article > Page 1 | 2 | 3
PERL Diving
Add Interactive Scripts
to Enhance Your Web Site

by Christopher Simmons, executive editor
Copyright © 2001 Christopher Simmons

(Continued — 3)

Most modern Web servers can run scripts as either filename.cgi, or filename.pl, and most servers can run cgi-scripts in any directory, and not just the "cgi-bin" (some hosting providers use "cgibin" as the default instead of "cgi-bin" so check with your provider, and adjust your config variables as needed). In Figure 2, you can see I have a second "cgi-bin" called "cgib," which has a shopping cart script in it.

Putting it Together
For your first practical application, choose a simple script with only a couple of files, like a form script or something similar. Assuming you have a PERL script in hand, and you’ve looked at the readme.txt or whatever documentation, know your proper paths, and have edited your config variables, then simply upload the file(s) where indicated, set permissions, then navigate with your browser to the script, and try to make it go.

If you get "not authorized" errors, this is usually because you missed a permission someplace. If you get an "internal server error" then this is most likely a bad directory path, or URL path—it’s telling you it can’t find something it needs to work, and so it failed to work at all. Some scripts have a debug mode, which if set to "on" (often by setting a variable to "Y" or "1" in the script), may print a more specific error to your browser screen, like "sorry, can’t locate ‘tmp’ directory." Sometimes an internal server error can also be because of permissions, such as a directory setting being too restrictive, and the script couldn’t write a temporary file to it.

Assuming everything else is done right, and a script still doesn’t work, it might be because it’s too old, or because it requires some kind of write privilege, which is no longer supported by most servers. This is common with many free PERL scripts written back in 1996 and 1997, especially those that write files to a directory, like a hit counter script. Essentially, the server is saying, "No, you can’t write to that directory like that," and it will always fail. In this case, look for a newer script.

What Are They Good For
Scripts are a wonderful thing, because they allow static HTML pages to add exciting and dynamic content. You’ve likely been to a site that had weather, stocks, your horoscope, celebrity birthdays, current news, and the like. All of this is coming from a script of some kind, because HTML pages don’t do anything by themselves. They are really gussied-up text pages that have been tricked over the years into including images and fancy table-based layouts. The fact is, all that is being done by the browser, and not the page itself. Scripts do the work and make content available to the browser, which is how your site visitor sees it.

© 2001 Christopher Simmons
Figure 5: Example of script folded into site content, showing local weather.

A really cool example of the power of a free PERL script is a script called HamWeather (hamweather.com). This script allows you to create your own local weather portal, or build that content into your existing content. If you look at Figure 5, you will see an example of how I added local weather and a four-day forecast to my Long Beach "beach cam" page on my hosting site. It took about 20 minutes to install, and another 20 to make it look the way I wanted amid my own layout. The script automatically pulls data from the National Weather Service, and puts in the appropriate weather graphics automatically.

The best starting point for finding PERL scripts is one of my favorite sites on the Web, cgi-resources.com, which has over 1900 PERL scripts covering everything from calendars, to form handlers, online auctions, surveys, and shopping carts. Most are free, many of the others are low-cost. Typically, the more business-oriented scripts tend to cost the most.

If you start with something simple, then move on to more complex scripts, you will find it surprisingly easy to tell your next client "Sure, I can do that."

 < E N D >


< Previous Page

Home > Web Works > Article > Page 1 | 2 | 3

Find books about using/learning PERL:
Amazon.com

Christopher Simmons has been creating Web sites since 1995 and is president of Neotrope, which offers Web design and brand marketing services. E-mail him at cs@digitalauthor.com. A version of this article appeared in the March 2001 edition of Micro Publishing News.

NOTICE: All content on this site is protected by U.S. and international copyright laws. By viewing this content, you agree to be bound by our Terms of Use. Reproduction, redistribution, or derivitive works in any form is strictly prohibited. Copyright © 1995-2002 Christopher Simmons — All Rights Reserved.
perl scripts, installing cgi scripts
 
 

shop at Amazon.com
100 Hot Books
100 Hot CDs
100 Hot DVDs
Hottest Software

Book Search


More Cool Stuff

Copr. ©śChristopher Simmons
Music to get creative!
Listen to the electronica space CD "Beserker" by Christopher Simmons while you work and be more creative!
More Info

perl scripts, installing cgi scripts perl scripts, installing cgi scripts
Top of Page | Home Page | Privacy | Panic Button

This site needs a modern web browser and Java. More Info
This Web site is powered by Neotrope™ Hosting

perl scripts, installing cgi scripts perl scripts, installing cgi scripts
digital artwork
perl scripts, installing cgi scripts
perl scripts, installing cgi scripts   perl scripts, installing cgi scripts
perl scripts, installing cgi scripts
web design the neotrope(tm) network - click to goperl scripts, installing cgi scripts
perl scripts, installing cgi scripts
neotrope