[mp2] Possible bug in Apache::Reload
[prev]
[thread]
[next]
[Date index for 2005/03/25]
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:
I believe I've found a bug in Apache::Reload. It shows up when you're
using the ReloadTouchFile option -- the effect is that the server gives
you a 500 error when the touchfile has not been modified. I believe this
is a result of the following code:
I suspect this problem would happen on Linux as well, but I'm
encountering it on a Windows machine. This is using Apache 2.0.53 and
Apache::Reload 0.09. (Apache::Reload was installed by Activestate's PPM
tool as part of mod_perl 2.0.0-RC4).
I believe the problem is the same as described in revision 69750
(http://svn.apache.org/viewcvs.cgi?rev=69750&view=rev), where the code
was returning 1 instead of an Apache constant.
Here's the code that I believe is responsible:
96 if ($TouchFile) {
97 warn "Checking mtime of $TouchFile\n" if $DEBUG;
98 my $touch_mtime = (stat $TouchFile)[9] || return 1;
99 return 1 unless $touch_mtime > $TouchTime;
100 $TouchTime = $touch_mtime;
101 open my $fh, $TouchFile or die "Can't open '$TouchFile': $!";
102 $TouchModules = <$fh>;
103 chomp $TouchModules if $TouchModules;
104 }
When I replaced "return 1" on line 99 with "return Apache::OK", the
modules I was using ran successfully, without the 500 error.
(I don't know whether or not the "return 1" on line 98 should also be
changed.)
2. Used Components and their Configuration:
*** mod_perl version 1.999021
*** using D:\Perl\site\lib\Apache2\Apache\BuildConfig.pm
*** Makefile.PL options:
MP_APR_LIB => aprext
MP_AP_PREFIX => D:\Apache2
MP_COMPAT_1X => 1
MP_GENERATE_XS => 1
MP_INST_APACHE2 => 1
MP_LIBNAME => mod_perl
MP_USE_DSO => 1
*** The httpd binary was not found
*** (apr|apu)-config linking info
(apr|apu)-config scripts were not found
*** D:\Perl58\bin\perl.exe -V
*** Packages of interest status:
Apache::Request: -
CGI : -
LWP : -
mod_perl : 1.999021
3. This is the core dump trace: (if you get a core dump):
There was no core dump
This report was generated by D:\Perl\bin\mp2bug on Fri Mar 25 16:14:03
2005 GMT.
-------------8<---------- End Bug Report --------------8<----------
--
/¯\
\ / ASCII RIBBON CAMPAIGN
X Against HTML Mail and News
/ \
 |
[mp2] Possible bug in Apache::Reload
Chris Warren 16:17 on 25 Mar 2005
|