mod_perl and DB2
Hey gang. Couldn't find an answer to this in the archives. We have a DB2 database that we access via mod_perl scripts. We have been getting errors in the Apache log files every morning whenever we first try to access the database. The error is: [Thu Apr 11 09:09:49 2002] null: DBD::DB2::db selectall_arrayref failed: [IBM][C LI Driver] CLI0108E Communication link failure. SQLSTATE=40003 at /usr/local/ap achessl/perl/reports/trans_history.pl line 90 It takes a restart of the web server to eliminate this problem. Is this the Morning Bug that I am encountering? I looked at the DB2.pm module and it appears that the ping() method has been implemented so I would think that this would prevent the Morning Bug from showing up. Should I reimplement the ping() method according to the Apache::DBI manpage? -David
CGI.pm 2.78 and mod_perl 1.26 troubles
Hey gang, I just upgraded the CGI.pm perl module to 2.78 (don't know what the old version was) and now none of my scripts running under Apache::Registry are working. Instead of executing the scripts, I'm prompted to save the script. Here is a sample script: #!/usr/bin/perl use CGI qw/:standard/; print header; #print Content-Type: text/html\n\n; print start_html, h1(Hello, World!), end_html; This works in the regular cgi-bin directory, but not in the directory for the mod_perl scripts. Uncomment the line that manually produces the header and comment out the call to header() and it works fine. I'm also getting the occasional error message in the error_log: [Thu Dec 6 10:41:53 2001] [error] Can't coerce array into hash at (eval 35) line 31. Has anybody else experienced this or have any clue as to what may be going on? Here is the perl section of httpd.conf and relevant stats: Apache 1.3.22 mod_perl 1.26 mod_ssl 2.8.5 httpd.conf: Alias /perl/ /usr/local/apachessl/perl/ Location /perl SetHandlerperl-script PerlHandler Apache::Registry PerlSendHeader On Options +ExecCGI /Location PerlRequire conf/startup.pl PerlFreshRestart On PerlTaintCheck On -David
Re: CGI.pm 2.78 and mod_perl 1.26 troubles
Solved it... apparently, if you upgrade CGI.pm while your web server is running, a restart is not good enough. You have to shutdown completely and then start it back up. *Sigh* -David On Thu, 2001-12-06 at 10:43, David Shrewsbury wrote: Hey gang, I just upgraded the CGI.pm perl module to 2.78 (don't know what the old version was) and now none of my scripts running under Apache::Registry are working. Instead of executing the scripts, I'm prompted to save the script. Here is a sample script: #!/usr/bin/perl use CGI qw/:standard/; print header; #print Content-Type: text/html\n\n; print start_html, h1(Hello, World!), end_html; This works in the regular cgi-bin directory, but not in the directory for the mod_perl scripts. Uncomment the line that manually produces the header and comment out the call to header() and it works fine. I'm also getting the occasional error message in the error_log: [Thu Dec 6 10:41:53 2001] [error] Can't coerce array into hash at (eval 35) line 31. Has anybody else experienced this or have any clue as to what may be going on? Here is the perl section of httpd.conf and relevant stats: Apache 1.3.22 mod_perl 1.26 mod_ssl 2.8.5 httpd.conf: Alias /perl/ /usr/local/apachessl/perl/ Location /perl SetHandlerperl-script PerlHandler Apache::Registry PerlSendHeader On Options +ExecCGI /Location PerlRequire conf/startup.pl PerlFreshRestart On PerlTaintCheck On -David