use DBI in perl cgi script
use DBI in perl cgi script
am 04.11.2007 01:45:44 von tkaman2
------=_NextPart_000_0007_01C81E41.5BF305A0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi, I have a perl cgi script that outputs HTML and I have the statement use
DBI at the top because I am doing some database stuff. I notice that when I
comment out use DBI (I previously commented out other database commands) my
webpage appears to load completely, but when I uncomment use DBI the page
never completely loads according to the status bar at the bottom of the web
browser. Even though all of the HTML has been outputted correctly the status
bar makes it appear that the page hasn't loaded. Has anyone seen this
before? Any help on how to correct it would be greatly appreciated! Thanks
Dave
------=_NextPart_000_0007_01C81E41.5BF305A0--
Re: use DBI in perl cgi script
am 04.11.2007 13:11:57 von Alexander
Check your error log, perhaps your script generates too much error
output (from warn, Carp, CGI::Carp, print STDERR). At least with apache
1.3 on win32, this is known to block CGI processes.
Alexander
On 04.11.2007 01:45, Dave Thomas wrote:
> Hi, I have a perl cgi script that outputs HTML and I have the statement use
> DBI at the top because I am doing some database stuff. I notice that when I
> comment out use DBI (I previously commented out other database commands) my
> webpage appears to load completely, but when I uncomment use DBI the page
> never completely loads according to the status bar at the bottom of the web
> browser. Even though all of the HTML has been outputted correctly the status
> bar makes it appear that the page hasn't loaded. Has anyone seen this
> before? Any help on how to correct it would be greatly appreciated! Thanks
>
> Dave
>
>
>
--
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/
RE: use DBI in perl cgi script
am 05.11.2007 16:46:13 von Will.Rutherdale
Dave:
To expand on Alexander's point, the usual place to look is
/var/log/httpd/error_log. All the STDERR from your cgi script goes
there. You should be using that to debug your code, not looking at the
status bar of the web browser.
Check your favourite documentation on Apache or cgi program for more
information.
-Will
> -----Original Message-----
> From: Alexander Foken [mailto:alexander@foken.de]
> Sent: Sunday 04 November 2007 07:12
> To: Dave Thomas
> Cc: dbi-users@perl.org
> Subject: Re: use DBI in perl cgi script
>
>
> Check your error log, perhaps your script generates too much error
> output (from warn, Carp, CGI::Carp, print STDERR). At least
> with apache
> 1.3 on win32, this is known to block CGI processes.
>
> Alexander
>
> On 04.11.2007 01:45, Dave Thomas wrote:
> > Hi, I have a perl cgi script that outputs HTML and I have
> the statement use
> > DBI at the top because I am doing some database stuff. I
> notice that when I
> > comment out use DBI (I previously commented out other
> database commands) my
> > webpage appears to load completely, but when I uncomment
> use DBI the page
> > never completely loads according to the status bar at the
> bottom of the web
> > browser. Even though all of the HTML has been outputted
> correctly the status
> > bar makes it appear that the page hasn't loaded. Has anyone
> seen this
> > before? Any help on how to correct it would be greatly
> appreciated! Thanks
> >
> > Dave
> >
> >
> >
>
>
> --
> Alexander Foken
> mailto:alexander@foken.de http://www.foken.de/alexander/
>
- - - - - Appended by Scientific Atlanta, a Cisco company - - - - - =
This e-mail and any attachments may contain information which is confiden=
tial,
proprietary, privileged or otherwise protected by law. The information is=
solely
intended for the named addressee (or a person responsible for delivering =
it to
the addressee). If you are not the intended recipient of this message, yo=
u are
not authorized to read, print, retain, copy or disseminate this message o=
r any
part of it. If you have received this e-mail in error, please notify the =
sender
immediately by return e-mail and delete it from your computer.
RE: use DBI in perl cgi script
am 06.11.2007 18:18:31 von tkaman2
I didn't see anything unusual in my apache logs... Maybe there is some
configuration that I haven't done. I'm fairly new to FreeBSD. If you or
anyone else have other ideas or have experienced this problem before I would
greatly appreciate your suggestions and ideas :-) Thanks
Dave
-----Original Message-----
From: Alexander Foken [mailto:alexander@foken.de]
Sent: Sunday, November 04, 2007 4:12 AM
To: Dave Thomas
Cc: dbi-users@perl.org
Subject: Re: use DBI in perl cgi script
Check your error log, perhaps your script generates too much error output
(from warn, Carp, CGI::Carp, print STDERR). At least with apache
1.3 on win32, this is known to block CGI processes.
Alexander
On 04.11.2007 01:45, Dave Thomas wrote:
> Hi, I have a perl cgi script that outputs HTML and I have the
> statement use DBI at the top because I am doing some database stuff. I
> notice that when I comment out use DBI (I previously commented out
> other database commands) my webpage appears to load completely, but
> when I uncomment use DBI the page never completely loads according to
> the status bar at the bottom of the web browser. Even though all of
> the HTML has been outputted correctly the status bar makes it appear
> that the page hasn't loaded. Has anyone seen this before? Any help on
> how to correct it would be greatly appreciated! Thanks
>
> Dave
>
>
>
--
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/
RE: use DBI in perl cgi script
am 06.11.2007 18:42:16 von Will.Rutherdale
The fundamental issue before you do anything else is to get error
messages. I mentioned in a previous post where you can usually see
them.
I don't know how experienced you are writing Perl code, but when writing
command-line scripts you quickly get used to seeing compilation errors
and other annoyances show up on the screen as you test the program
repeatedly. This helps you get to the bottom of the problem quickly.
In the cgi world you have to mimic that environment as closely as
possible by tracking the error log. You must get to the error messages
coming out or you have almost no hope of finding what the problem is.
Is your environment Unix/Linux or Windows?
Can you try this: tail -f /var/log/httpd/error_log
If you can do that then you can see what comes out in the error log as
you run your script.
If you cannot, then nobody here can help you. This is a DBI mailing
list, and your messages so far haven't established that there is any
problem with DBI.
You *must* trace the error log.
-Will
> -----Original Message-----
> From: Dave Thomas [mailto:tkaman2@hotmail.com]
> Sent: Tuesday 06 November 2007 12:19
> To: 'Alexander Foken'
> Cc: dbi-users@perl.org
> Subject: RE: use DBI in perl cgi script
>
>
> I didn't see anything unusual in my apache logs... Maybe there is some
> configuration that I haven't done. I'm fairly new to FreeBSD.
> If you or
> anyone else have other ideas or have experienced this problem
> before I would
> greatly appreciate your suggestions and ideas :-) Thanks
>
> Dave
>
- - - - - Appended by Scientific Atlanta, a Cisco company - - - - - =
This e-mail and any attachments may contain information which is confiden=
tial,
proprietary, privileged or otherwise protected by law. The information is=
solely
intended for the named addressee (or a person responsible for delivering =
it to
the addressee). If you are not the intended recipient of this message, yo=
u are
not authorized to read, print, retain, copy or disseminate this message o=
r any
part of it. If you have received this e-mail in error, please notify the =
sender
immediately by return e-mail and delete it from your computer.