★ wanayoo — archive 1999 http://www.getscript.com/debug.htmlNouvelle recherche | Portail wanayoo

Support Our Sponsor!
Company Menu
DBasics Software Company offers complete Internet services except ISP dialup services. For those familiar with CGI scripts, we have a variety of powerful web management scripts from statistical counters to web forums. For those who don't have the time to learn how to install CGI scripts, we offer installation for all our scripts. We also offer web hosting options, online secure credit card payment options and more Home Page
Updates to our current script library and additions to both our scripts and services can be found here. What's New
A little about us and pics of our office located at the Lake of the Ozarks About Us
A little about us and pics of our office located at the Lake of the Ozarks Grade Us!


CGI/Perl Scripts
Where to purchase any of our scripts. How to Purchase
For those using the .htaccess and .htpasswd protection scheme, this script automates registering new users. Password Protected
Seeking to expand Matt's Script WWWBoard 2.0a with the largest collection of add-ons available in one place. We've compiled all our add-ons into Matt's original WWWBoard 2.0a script that can be easily installed to work with your existing WWWBoard. WWWBoard Pro
In order to achieve your web site objectives, you need to understand who your visitors are, what they are viewing, what types of browsers people are using to view your site and probably most importantly, where your visitors are coming from. Statistical Counter
Operating a subscription web site is rapidly becoming the preferred choice for webmasters seeking to own a business on the Internet. Subscription Site
The Post-It script is a tool for webmasters to post updates and/or messages to a page via their web browser. Post-It Script
The site search script allows visitors to search for pages on your site. Simple Site Search
This script incorporates databases, such as address books, product catalogs, reference databases and such into their pages. Web Address Book
The file management script allows you to make changes to your pages without having to go into FTP or telnet. File's Manager
Our WWWAdmin Pro Script allows you to create and edit multiple web boards in addition to the original features offered with Matt's Script WWWAdmin 2.0a. WWWAdmin Pro
This script allows you to run other administrative type scripts in unprotected directories Script Protection
This is a good script if you wish to see what pages a particular visitor viewed while on your site. Tracing Footsteps
This script reads your server logs and return the number of unique visitors and/or total hits. Unique Visitors
This is a good script if you wish to monitor the hits on your site at any given moment. View Recent Hits
A detailed listing of all the URL's listed above including installation URLs and demo links Listing of URLs


CGI Installation
& Customization

A listing of CGI programmers who have scripts available and may be available for both custom and installation work Programmer Listing
This is where programmers seeking outsourced jobs can list themselves which appears at http://www.getscript.com/programmers/ Programmer Signup
Your request for receiving quotes is automatically emailed to everyone on our list saving you time in writing requests for quotes on both installation and customized projects. Request for Quotes
How to obtain Technical Support on any of our scripts or other scripts downloaded from the Internet Customer Support
How to obtain Technical Support on any of our scripts or other scripts downloaded from the Internet Customer Support


Tech Forums
Free Forum about CGI/Perl (Registration is Required) CGI/Perl Scripts
Member's Only Forum (Registration is Required) WWWBoard Pro
Member's Only Forum (Registration is Required) WWWAdmin Pro
Member's Only Forum (Registration is Required) Statistical Counter
Member's Only Forum (Registration is Required) Web Address Book
Member's Only Forum (Registration is Required) Post-It Script
Member's Only Forum (Registration is Required) Files Manager
Member's Only Forum (Registration is Required) Password Protect
Member's Only Forum (Registration is Required) Site Search
Technical Forum Tracing Footsteps
Technical Forum Unique Visitors
Technical Forum View Recent Hits


Message Board
Hosting Service

DBasics Software Company offers complete Internet services except ISP dialup services. For those familiar with CGI scripts, we have a variety of powerful web management scripts from statistical counters to web forums. For those who don't have the time to learn how to install CGI scripts, we offer installation for all our scripts. We also offer web hosting options, online secure credit card payment options and more ForumBoard Home
DBasics Software Company offers complete Internet services except ISP dialup services. For those familiar with CGI scripts, we have a variety of powerful web management scripts from statistical counters to web forums. For those who don't have the time to learn how to install CGI scripts, we offer installation for all our scripts. We also offer web hosting options, online secure credit card payment options and more Hosting Features
Forums that are being currently hosted on forumboard.net Boards Hosted
Simple straight forward pricing plan Hosting Options
Step One: Sign up your new forum here! Hosting Signup


Freebie Scripts
Shows the last 10 errors that occurred on your site Server Error Script
How to find bad links to and from your site. Bad Link Finder
Listing of Environmental Variables used within CGI Scripts Environment $vars


Tutorials
How to Create a Business Online Business Online
The complete official WWWFAQ. W.W.Web Faq
Things to look for while debugging CGI Scripts Debugging CGI
Complete Perl Messages Sent To Server Error Logs Perl Error Msgs
An explanation of the commands and subroutines in Matt's Script WWWBoard CGI Anatomy 101
Server Side Includes allows insertion of data into an HTML page HTML & SSI's
Search Engine Do's and Don'ts Search Engine Tips


Other Services
We offer a real-time Account Management System providing impression/click-thru ratios. Your Account Management System also allows you to change the banner being displayed and/or URL for the click-thru. Additionally each month you will receive an emailed monthly statement which will display the amount left on your account and a listing of all the URL's your banner was displayed and clicked-thru. Advertising Rates
Counter Service for those who cannot run CGI scripts on their own server HWCounter Service
For those interested in earning 25¢ credit towards the purchase price of any of any our scripts by linking to GetScript, just cut and paste our coding on any of your pages. Then each time a visitor clicks on the link we will add another 25¢ credit to your current balance. Link and Earn
A detailed report of when, who and where your links to us came from. Link Reporting
We offer a extensive viewing of events Today in History for each day of the year including birthdays which are linked to InfoSeek. Today in History
What type of script would be useful for your type of web site? And Survey Said
Each day, 2,300 missing children are reported to local police and entered into the FBI's computer system. Missing Children


CGI / Perl
Bookstore

The CGI/Perl Cookbook
[Click on Book]

Please Support Our Sponsor Above. Thanks!

DBasics Software Company offers complete Internet services except ISP dialup services. For those familiar with CGI scripts, we have a variety of powerful web management scripts from statistical counters to web forums. For those who don't have the time to learn how to install CGI scripts, we offer installation for all our scripts. We also offer web hosting options, online secure credit card payment options and more
[Home] [Company] [Hosting] [Scripts] [Support] [Forums]
[Purchase] [Freebies] [Tutorials] [Services] [Advertising]
DBasics Software Company
Last Updated: Thursday, 13-Jul-2000 21:32:30 EDT

This page addresses the more common problems that you may encounter when installing and running CGI scripts. The following message is the standard error message displayed when a problem is encountered while running your CGI scripts. This message doesn't tell you anything about solving the problem that was encountered.

Internal Server Error

This server has encountered an internal error which prevents it from fulfilling your request. The most likely cause is a misconfiguration. Please ask the administrator to look for messages in the server's error log.

This error message does tell you how to find the problem by "asking the administrator to look for messages in the server's error log". However, DON'T waste your time asking the system administrator to look in the server's error log for you. Most system administrators are not responsive to requests for help in debugging your CGI scripts. So it's up to you to find the answers yourself.

Instead, ask your system administrator to assist by answering the question "Where is the server's error log?". If they don't answer this question, you should be finding another service to host your pages.

Once you find the location of your server's error log, you should download and install our error log script which will provide you with more detailed information about the error encountered.

The following list contains the most frequently displayed messages displayed by your server's error log. In many cases, the error message will be vague and won't tell the exact problem. Almost all messages will contain the statement ... "failure: for host XXX.XXX.XXX.XXX trying to GET", so I've only listed the key portion of the message to look for. In all examples below, my use of XXX or xxx denotes variable text and/or numbers.

#!/usr/local/bin/perl

Error: send-cgi reports: can't exec /path/to/script.pl
Cause: Incorrect path to Perl on server. Make sure the first line of your CGI Script starts with #! and points to the path of Perl on your server. Most paths should reflect #!/usr/bin/perl but this is not always the case. To find the path on your server from telnet, type in system command whereis perl

print "Content-type: text/html\n\n";

Error: cgi-parse-output reports: the CGI program /path/to/script.pl did not produce a valid header (name without value: got line "")
Cause: If the CGI script outputs any results to the browser, such as an HTML formatted page, it must first contain this statement telling the server how the output is to be formatted. This statement must be present prior to any print "xxxxxx"; statements. However, if the script is going to redirect to a different URL after processing, the script will not contain this statement.

print "Use of \"quotes\" Within HTML Tags";

Error: cgi-parse-output reports: the CGI program /path/to/script.pl did not produce a valid header (name without value: got line "bare word found where operator expected at /path/to/script.pl line 8, near "" nextword)
Cause: Improper Use of Quotes. This is one of the most common errors encountered. Because most scripts return an HTML formatted page, the use of quotes in formatting can present unique problems. When using the print ""; to send output to the display, if you use quotes within the command's quoted statement, you must preceed the quote with a backslash ( i.e. /" ). By using a backslash you are telling the compiler to treat the quote as part of the HTML output and not part of the perl process.

You can work around this common problem by replacing the command's first quotation mark from print " to reflect print qq| and ending the command with |; instead of "; as shown below.

print qq|Use of "quotes" Within HTML Tags|;

Instead of using ....

print "Use of \"quotes\" Within HTML Tags";

NOTE: What's nice about this error message is that it will tell you the line number and the next word after the point the error occurred which makes it extremely easy to debug.

require "file.pl";

Error: cgi-parse-output reports: the CGI program /path/to/script.pl did not produce a valid header (name without value: got line "can't locate script.cfg in @inc at /path/to/script.pl line 9.")
Cause: Could not find referenced script in the require statement. Some scripts incorporate other scripts or files in their operation. A good example is the use of wwwboard.cfg configuration file which allows you to make modifications to the wwwboard.cfg without editing the main wwwboard.pl script. This requires the use of the require "wwwboard.cfg"; statement which tells the script to include the wwwboard.cfg file upon execution of the script. If the file referenced in the require statement is in a different directory from the script being executed, you MUST include the full directory path.

This is a common problem when using CRONTAB where a script is executed automatically at a given date/time. If the script being executed contains the require "xxxxx.pl"; statement, be sure to reference the FULL directory path on the server although the script being executed is in the same directory as the required file.

As a general note, always include the FULL directory path of all files referenced in all your scripts. This will eliminate alot of FILE NOT FOUND errors in your scripts and also allows you to move your scripts elsewhere on the site without having to worry about paths referenced in your scripts.

open(FILE, "$filename") || die "Can't open $filename !\n";

Error: cgi-parse-output reports: the CGI program /path/to/script.pl did not produce a valid header (name without value: got line "no such file or directory at /path/to/script.pl line 19.")
Cause: The file referenced in the open() statement could either not be opened as was instructed to abort processing because of the || die "Can't open $response !\n"; statement. The use of the || (double pipe denotes the flow control statement "or") tells the script to OPEN the file OR abort processing. You can leave off the || die "Can't open $response !\n"; portion of the statement in which the script would continue processing. The problem with doing this would be that you wouldn't know that the file was not properly opened.

Using the || die "Can't open $response !\n"; statement will record which file could not be READ or WRITTEN too in your error log. Keep in mind that the portion of the die statement that contains the $variable must match the $variable displayed in the open() statement.

Solution! Check the to make sure the $variable path is correct and that the file permissions to READ and WRITE are properly set accordingly.

REMAINDER OF PAGE IS UNDER CONSTRUCTION!

More CGI Troubleshooting Tips To Come!



We've Displayed Pages to Visitors Today.


(DBasics Software's ICQ# 4652929)

Copyright © 2000 All Rights Reserved
DBasics Software Company
P.O. Box 986, Sunrise Beach, MO. 65079