This resource is intended as a general framework for working through problems with CGI scripts. It is not a complete guide to every problem that you may encounter, nor a tutorial on bug squashing. It is just the culmination of my experience debugging CGI scripts for ten years. This page seems to have had many different homes, and I seem to forget it exists, so I'm adding it to the Monastery's canon. You can send any comments or suggestions to me at cbdfoy@cpan.org. You may also want to see the CGI Meta FAQ for a list of references.
. Some servers are sensitive to error output (on STDERR) showing up before standard output (on STDOUT).print header()
Either way, the first thing output should be the CGI header followed by a blank line.$|++; #sets $| for STDOUT $old_handle = select( STDERR ); #change to STDERR $|++; #sets $| for STDERR select( $old_handle ); #change back to STDOUT
Unset or remove these variables
Set these variables
use CGI qw(-debug)
Edited by davido: Fixed HTML and formatting to eliminate horizontal scrolling in IE.
In reply to Troubleshooting Perl CGI scripts by brian_d_foy
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |