Curt Russell Crandall wrote:

> You can also set the CGI.pm debug mode to ON, enter the perl debugger, set
> the appropriate parameters and set through the file.  Sometimes the
> results can be different than running through the browser, but other times
> it might point out bugs that may not be easily identified by examining the
> HTML output.

At least with DBD::Informix, and probably with other drivers too, the normal
problem when something works from the command line but not via a web server
(browser) is the environment.  When I say normal, I mean 99% of the time.  In
general, web servers do not set the environment variables you need by default --
you have to configure them to do so.  And, if you're running Perl scripts via
CGI, it is not very hard to validate the environment by creating a script that
prints the environment out.  Apache even provides a test script in cgi-bin that
does precisely that.


> On Thu, 12 Apr 2001, Paul A. Chernoch wrote:
>
> > When I am debugging CGI scripts, I follow this simple approach:
> >
> > 1. Manually set the CGI environment parameters to simulate a CGI call.
> > 2. Invoke the CGI script from the command line on the server.
> > 3. Look at the HTML text that is output. If it looks wrong, fix the script.
> > (It helps to create a static HTML file on the server that contains all the
> > text except the Content-type header to really make sure the HTML is OK.)
> > 4. If the HTML that is output looks OK, then create a simple Perl script
> > that simply prints out this resulting HTML (with the Content type header)
> > to see if that works. If it does not, perhaps your web server requires you
> > to fill in more of the HTTP headers than just the content-type? (I have
> > seen this happen with some web servers.)
> >
> > If none of this works, you are on your own...
> >
> > At 07:14 PM 4/11/2001 -0500, Aguztyn Garcia-Cruz wrote:
> > >Some body can Help ME?




--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED])
Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
#include <disclaimer.h>


Reply via email to