Introduction to Cgi/Perl: Getting Started With Web Scripts
Language: English
Published by M & T Books, 1995
- Softcover
- Used

Seller: Wonder Book, Frederick, MD, U.S.A.Wonder Book
AbeBooks seller since November 1, 1997
Condition: Used - As new
US$ 26.44
Quantity: 1 available
Add to basketItem description from seller
Like New condition. (computer, programming, html).
Seller Inventory # NC03B-01054
- Title
- Introduction to Cgi/Perl: Getting Started With Web Scripts
- Author
- Brenner, Steven E., Aoki, Edwin
- Publisher
- M & T Books
- Publication year
- 1995
- Condition
- As New
- Binding
- Soft cover
- Language
- English
- ISBN 10
- 1558514783
- ISBN 13
- 9781558514782
"Synopsis" may belong to another edition of this title.
Excerpt. © Reprinted by permission. All rights reserved.
Recognizing a Script When You See It
How does a server tell that a CGI script is a script and not a document file? Often, without some help from the script writer, it can't. In fact, one of the most common errors encountered by CGI programmers is the failure to provide the hints necessary for the server to make this distinction. A confused server may generate a variety of different errors, depending upon how the server is configured and how the script was called. The most common result is that the text of the script (i.e., its source code, as in Listing 1.2) is output, rather than the result of its execution. You might also receive errors like "can't POST to non-script"- this message is particularly infuriating because posting to a script is exactly what you are trying to do.These problems arise because there are no set standards for how a server should recognize a CGI script; consequently, different servers work in different ways. A model used by both the NCSA and CERN servers is to have a special directory in which all scripts (and only scripts) reside. The actual location of the directory on the disk and the name by which it is accessed over the Web (typically /cgi-bin) are specified in configuration files. Any request for a document in that directory or its subdirectories is treated as a request to execute that document as a script. Most servers support this model.
A newer approach is to use a filename extension to recognize CGI scripts, mirroring the technique used to determine a file's Media Type. The precise extension (and indeed the ability to have the extension specify a CGI script) is typically defined as part of the server's configuration. The most common extension for scripts is .cgi, though most Windows servers use the extensions .exe or .pl, and recent versions of Macintosh servers have used .acgi.
The use of extensions means that the CGI scripts can reside anywhere in the server's directory space, which has benefits and drawbacks. On the plus side, it means that scripts can be kept in intuitive locations, near related HTML files and other documents. On the minus side, spreading scripts all over the directory hierarchy makes it harder to keep track of all of them, in case they need to be updated. More importantly, if the server is configured to allow access to documents in users' personal directories (typically by mapping URLs with ~username to ~username/public_html), anyone can create and execute their own CGI scripts. While this may be appealing, it is common for inexperienced users to inadvertently write CGI programs with major security holes (especially if using shell scripts). Thus, a single user can potentially jeopardize the security of an entire server computer.
For these reasons, many servers come with extension-based CGI script recognition disabled by default. Even if enabled, many Internet service providers explicitly prohibit CGI scripts in users' space to avoid security hassles. If you try to run a CGI script in an area of the server where their use is not permitted, you may receive an access denied error. This message can be confusing as it also appears when a file's permissions are set incorrectly. Refer to Appendix A for additional troubleshooting hints.
Only a server can interact with a script. A client program cannot directly run (e.g., with the "open file" command) a CGI script; if asked to do so, the browser will likely display the script's source code. Because CGI communications take place between a server and a script, every CGI interaction must involve an HTTP server.
More information can be found at www.mispress.com/introcgi/ the Online Appendix to the book. While this Online Appendix was especially designed to complement the book, it can serve as a useful resource for anyone interested in CGI and Perl. In addition to current information about CGI, Perl, and the Web, you can also find downloadable code, pointers to the Perl distribution, and links to other helpful sites. It also has a mirror of the homepage for cgi-lib.pl, the de facto standard library for creating CGI scripts with Perl.
"About the title" may belong to another edition of this title.
Wonder Book
Frederick, MD, U.S.A.
Shipping rates within U.S.A.
| Item | 5 to 9 business days | 3 to 6 business days |
|---|---|---|
| First item | US$ 0.00 | US$ 10.98 |
Payment methods
Store description
With 3 stores less than 1 hour outside the DC/Metropolitan area (1 in Gaithersburg, 1 in Frederick and 1 in Hagerstown, MD), we have the largest selection of books in the tri-state area. Wonder Book and Video has been in business since 1980 and online since 1997. We have over 1 Million books for sale on our website and another 1 Million books for sale in our 3 locations. Items on Abe are not necessarily in stock at our retail locations. Please do not call the stores to place orders for Abe Books sales. We have a very active online inventory and as such, we can receive multiple orders for the same item. We fill those orders on a first come first serve basis, but will refund promptly any items that are out of stock. Since 1980 it has always been about the books. ALL kinds of books from 95 cent children's paperbacks to five figure rare and collectibles. A merging of the old and new is where we started, and it is where we are today. Our retail stores have always been places where a reader can rush in looking for a title needed for a term paper that is due the next day, or where bibliophiles can get lost "in the stacks" for as long as they wish. In 2002 USAToday recognized us as "1 of 10 Great Old Bookstores", and we have been featured in numerous other newspaper and TV stories including Washington Post and CSpan. Members ABAA, ILAB.…
Association member
Members of these associations are committed to maintaining the highest standards. They vouch for the authenticity of all items offered for sale. They provide expert and detailed descriptions, disclose all significant defects and/or restorations, provide clear and accurate pricing, and operate with fairness and honesty during the purchase experience.Seller's business information
Wonder Book
Wonder Book and Video, 1550 Tilco Drive
Frederick, MD U.S.A. 21704
Terms of sale
We want you to be satisfied with the book you order. Our general description is conservative and the book should be as good or better than our general description may indicate.
RETURNS are cheerfully accepted up to 30 days. We ship out within 1-2 business days and U.S. Standard Shipments usually arrive within 6-9 business days, Priority 3-6. We want you to be satisfied with the book you order. Our general description is conservative and the book should be as good or better than our general description may indicate. We respond to every order inquiry within 2 business days, however our emails may occassionally get moved to spam/junk folders or refused from your internet/email provider. IF YOU HAVE EMAILED US AND HAVE NOT RECEIVED A RESPONSE - PLEASE CHECK YOUR SPAM SETTINGS AND/OR ADD OUR EMAIL TO YOUR ADDRESS BOOK.
Shipping terms
STANDARD DOMESTIC U.S. SHIPPING IS FREE. Priority Shipping is only $6.99 for first item, $1 each additional. Orders ship within 2 business days. Shipping outside of U.S. is typically between $8-13 and takes between 8-15 business days. Heavier books may require additional shipping. Faster Needs Please Inquire.