I have searched the archives and various websites to find my problem and its associated resolution to no avail.
 
I upgraded my working Apache 1.3 and mod_perl 1.x website using the PerlRun option of modperl to the RedHat 8.0 standard release with Apache/mod_perl 2.0 combo -- bad move it appears.
 
When I start mod_perl on my website, the first couple of CGI loads on a given script work and then I begin to receive blank page responses.  Meaning, I refresh the page and the response is just blank.  No errors, no text (other than a standard header).  Looking in the log file all I see is:
 
[24/Dec/2002:12:56:10 -0500] "GET /cgi-bin/filter.cgi?Mode=ListApplicants HTTP/1.1" 200 0 "http://mysite.com/cgi-bin/jobs.cgi?Mode=DisplayResponses" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)"
 
and the error log indicates no errors at all.  Note the above that I have a 200 status with 0 bytes, when in reality when it does work, it should show several thousand bytes of transfer.  After a few more refreshes, I get output that I expect.  This happens with all of my scripts, not just the same one.  If I restart the server, it always works the first time.  Invariably the first and subsequent refreshes tend to fail (produce blank pages).
 
I have enabled any and all types of debugging.  I found in RegisteryCooker where I could enable some debugging and it shows it going through, loading and compiling the script, running it and then flushing the namespace, but no HTML output occurs. 
 
I am using the prefork() MPM and fiddled with various settings to no avail.  I have ensured that caching is disabled, I have played with mod_expire settings, moved the mod_perl module to be loaded first and all kinds of stuff just to try and get the behavior to change, all to no avail as well.  I also used some suggestions on how to use the mod_perl::Registry with settings to force it to restart threads everytime and it doesn't work either.  My scripts all use DBI with mysql.  I have noticed that the mysql server is not being hit when the script produces a blank response.  So that tells me that either the "eval{}" call in RegistryCooker is really not working somehow or the script is simply not running, but producing no errors anywhere.  I don't know why the eval{} call to run my script would work the first time and fail the second time, strange.
 
My perlrun configuration is:
 
PerlModule Apache2
PerlModule Apache::DBI
PerlRequire  /etc/httpd/conf.d/startup.pl
 
<Directory /home/usa/cgi-bin>
    SetHandler perl-script
    PerlHandler ModPerl::PerlRun
    PerlSendHeader On
    PerlOptions +ParseHeaders
    Options ExecCGI FollowSymLinks Includes
</Directory>
 
startup.pl contains:
 
# This will give us a stack trace when a perl script dies
#$SIG{__WARN__} = \&Carp::cluck;
 
# Load CGI.pm and call its compile() method to precompile
# (but not to import) its autoloaded methods.
use CGI ();
CGI->compile(':all');
 
use Apache::DBI() ;
use DBI() ;
All the scripts run fine without mod_perl, and in fact ran just fine on the old Apache 1.x system with mod_perl.  I am at the end of my wits on this one and looking for ideas.
 
Thanks
dale
 
 

Reply via email to