You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ron Savage <ro...@savage.net.au> on 2003/02/17 00:56:53 UTC
[MP2] Apache::Reload date bug
Folks
I don't know if this an Apache problem, or a mod_perl problem.
Apache::Reload outputs a UTC date rather than a local date, when it
encounters an error. Here's an excerpt from my log.
Notice how the dates go Sun, Mon, ..., Sun.
[Sun Feb 16 18:31:25 2003] [error] [client 127.0.0.1] Execution of
C:/Apache2/cgi-bin/test/test-path-info.cgi aborted due to compilation
errors., referer: http://127.0.0.1/cgi-bin/test/test-path-info.cgi
[Mon Feb 17 10:44:04 2003] [error] [client 127.0.0.1] Premature end
of script headers: menu-process-module.cgi, referer:
http://127.0.0.1/cgi-bin/menu-process-module.cgi
[Mon Feb 17 10:44:04 2003] [error] [client 127.0.0.1] Can't locate
Module/MakeDist.pm in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/lib .) at C:/Apache2/cgi-bin/menu-process-module.cgi
line 15., referer: http://127.0.0.1/cgi-bin/menu-process-module.cgi
[Mon Feb 17 10:44:04 2003] [error] [client 127.0.0.1] BEGIN
failed--compilation aborted at
C:/Apache2/cgi-bin/menu-process-module.cgi line 15., referer:
http://127.0.0.1/cgi-bin/menu-process-module.cgi
[Sun Feb 16 23:49:41 2003] -e: Apache::Reload: Can't locate
C:/Perl/site/lib//CGI/Explorer.pm
--
Cheers
Ron Savage, ron@savage.net.au on 17/02/2003
http://savage.net.au/index.html
Re: [MP2] Apache::Reload date bug
Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Wed, 19 Feb 2003, Stas Bekman wrote:
>
>
>>Ron Savage wrote:
>>
>>>On Tue, 18 Feb 2003 12:56:38 +1100, Stas Bekman wrote:
>>>
>>>
>>>>perl -le 'warn("foo\n")'
>>>
>>>You got the quotes wrong for MS Windows, so I ran it twice:
>>>
>>>C:\Backup>perl -le "warn(qq|foo\n|)"
>>>foo
>>>
>>>C:\Backup>perl -le 'warn("foo\n")'
>>
>>well, you've got the idea, right.
>>
>>Perhaps someone on win32 can try to debug the behavior that you
>>saw. I can't reproduce it on my linux box.
>
>
> With my ActivePerl 8xx compatible perl-5.8, sticking in a
> warn("foo\n");
> inside a simple handler that uses Apache::Reload
> just output "foo" in the error log, with no timestamp
> nor client reported, as expected. I'm wondering though
> if this is coming from one of the custom modules
> used - in the log
> ===========================================================
> [Sun Feb 16 23:49:41 2003] -e: Apache::Reload: Can't locate
> C:/Perl/site/lib//CGI/Explorer.pm
> ===========================================================
> the message from Apache::Reload:
> warn("Apache::Reload: Can't locate $file\n"), next
> unless defined $mtime amd $mtime;
> has a '-e:' in front, suggesting perhaps that another
> module is contributing to this entry. Can you make up
> a stripped-down version that exhibits this behaviour?
I thought of that too, but wasn't sure if this is something special to win32.
Could it be that the logs get interleaved?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: [MP2] Apache::Reload date bug
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 19 Feb 2003, Stas Bekman wrote:
> Ron Savage wrote:
> > On Tue, 18 Feb 2003 12:56:38 +1100, Stas Bekman wrote:
> >
> >>perl -le 'warn("foo\n")'
> >
> > You got the quotes wrong for MS Windows, so I ran it twice:
> >
> > C:\Backup>perl -le "warn(qq|foo\n|)"
> > foo
> >
> > C:\Backup>perl -le 'warn("foo\n")'
>
> well, you've got the idea, right.
>
> Perhaps someone on win32 can try to debug the behavior that you
> saw. I can't reproduce it on my linux box.
With my ActivePerl 8xx compatible perl-5.8, sticking in a
warn("foo\n");
inside a simple handler that uses Apache::Reload
just output "foo" in the error log, with no timestamp
nor client reported, as expected. I'm wondering though
if this is coming from one of the custom modules
used - in the log
===========================================================
[Sun Feb 16 23:49:41 2003] -e: Apache::Reload: Can't locate
C:/Perl/site/lib//CGI/Explorer.pm
===========================================================
the message from Apache::Reload:
warn("Apache::Reload: Can't locate $file\n"), next
unless defined $mtime amd $mtime;
has a '-e:' in front, suggesting perhaps that another
module is contributing to this entry. Can you make up
a stripped-down version that exhibits this behaviour?
--
best regards,
randy
Re: [MP2] Apache::Reload date bug
Posted by Ron Savage <ro...@savage.net.au>.
On Wed, 26 Feb 2003 22:30:51 -0600 (CST), Randy Kobes wrote:
>On Thu, 27 Feb 2003, Ron Savage wrote:
>
>>On Wed, 26 Feb 2003 09:23:39 +1100, Stas Bekman wrote:
HI Randy
>The mod_perl 2 ppm package (for ActivePerl 8xx) at
>http://theoryx5.uwinnipeg.ca/ppms/ is updated
>periodically with a cvs build - as of tonight, it's
>current.
Thanx. Now my dual-booter at work is working, I hope to try this
tomorrow. It's 8pm here now.
--
Cheers
Ron Savage, ron@savage.net.au on 27/02/2003
http://savage.net.au/index.html
Re: [MP2] Apache::Reload date bug
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 27 Feb 2003, Ron Savage wrote:
> On Wed, 26 Feb 2003 09:23:39 +1100, Stas Bekman wrote:
>
> Hi Stas
>
> >Have you tried the current mod_perl cvs?
>
> No. Being usually a Windows (shudder) user, I wait for Randy to issue
> a build.
The mod_perl 2 ppm package (for ActivePerl 8xx) at
http://theoryx5.uwinnipeg.ca/ppms/ is updated
periodically with a cvs build - as of tonight, it's
current.
--
best regards,
randy
Re: [MP2] Apache::Reload date bug
Posted by Ron Savage <ro...@savage.net.au>.
On Wed, 26 Feb 2003 09:23:39 +1100, Stas Bekman wrote:
Hi Stas
>Have you tried the current mod_perl cvs?
No. Being usually a Windows (shudder) user, I wait for Randy to issue
a build.
Today I spent 4 hours failing to install Red Hat 6, Red Hat 8 and
Mandrake 9 on a brand new Dell with a 82854G/GL video chip. I was
aiming for a dual-boot system. Amazing :-(.
--
Cheers
Ron Savage, ron@savage.net.au on 27/02/2003
http://savage.net.au/index.html
Re: [MP2] Apache::Reload date bug
Posted by Stas Bekman <st...@stason.org>.
Ron Savage wrote:
> On Tue, 25 Feb 2003 09:40:05 +1100, Stas Bekman wrote:
>
>
>>And what your error_log says?
>
>
> Nothing is output to the error_log.
Have you tried the current mod_perl cvs?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: [MP2] Apache::Reload date bug
Posted by Ron Savage <ro...@savage.net.au>.
On Tue, 25 Feb 2003 09:40:05 +1100, Stas Bekman wrote:
>And what your error_log says?
Nothing is output to the error_log.
--
Cheers
Ron Savage, ron@savage.net.au on 25/02/2003
http://savage.net.au/index.html
Re: [MP2] Apache::Reload date bug
Posted by Stas Bekman <st...@stason.org>.
Ron Savage wrote:
> On Wed, 19 Feb 2003 10:04:02 +1100, Stas Bekman wrote:
>
>>Ron Savage wrote:
>>
>>>On Tue, 18 Feb 2003 12:56:38 +1100, Stas Bekman wrote:
>>
>
> Hi Folks
>
> In endeavouring to reproduce this problem, I've encountered another:
> main.cgi:
> -----><8-----
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> use CGI;
> use Dummy;
>
> # --
>
> my($title) = 'Test';
> my($q) = CGI -> new();
> my($s) = Dummy -> string();
>
> print $q -> header({type => 'text/html;charset=ISO-8859-1'}),
> $q -> start_html({title => $title}),
> $q -> h1({align => 'center'}, $s),
> $q -> end_html();
> -----><8-----
>
> Dummy.pm (in /perl/site/lib/):
> -----><8-----
> package Dummy;
>
> sub string{'This is a string'}
>
> 1;
> -----><8-----
>
> Output when run as /perl/main.cgi. Only the first line is expected
> (by me.) Ie why does the text from OK down, appear? :
> -----><8-----
> This is a string
> OK
> The server encountered an internal error or misconfiguration and was
> unable to complete your request.
>
> Please contact the server administrator, ron@savage.net.au and inform
> them of the time the error occurred, and anything you might have done
> that may have caused the error.
>
> More information about this error may be available in the server
> error log.
And what your error_log says?
OK is part of the error message. I think I've fixed that in the cvs version.
See if you get any better with it.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: [MP2] Apache::Reload date bug
Posted by Ron Savage <ro...@savage.net.au>.
On Wed, 19 Feb 2003 10:04:02 +1100, Stas Bekman wrote:
>Ron Savage wrote:
>>On Tue, 18 Feb 2003 12:56:38 +1100, Stas Bekman wrote:
Hi Folks
In endeavouring to reproduce this problem, I've encountered another:
main.cgi:
-----><8-----
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
use Dummy;
# --
my($title) = 'Test';
my($q) = CGI -> new();
my($s) = Dummy -> string();
print $q -> header({type => 'text/html;charset=ISO-8859-1'}),
$q -> start_html({title => $title}),
$q -> h1({align => 'center'}, $s),
$q -> end_html();
-----><8-----
Dummy.pm (in /perl/site/lib/):
-----><8-----
package Dummy;
sub string{'This is a string'}
1;
-----><8-----
Output when run as /perl/main.cgi. Only the first line is expected
(by me.) Ie why does the text from OK down, appear? :
-----><8-----
This is a string
OK
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, ron@savage.net.au and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.
More information about this error may be available in the server
error log.
----------------------------------------------------------------------
----------
Apache/2.0.43 Server at 127.0.0.1 Port 80
-----><8-----
The part of httpd.conf controlling /perl/. Note Dummy is not included
here, but the original module, which revealed the original bug, is:
----><8----
<IfModule mod_perl.c>
PerlModule Apache::Reload
PerlInitHandler Apache::Reload
PerlSetVar ReloadAll Off
PerlSetVar ReloadModules "CGI::Explorer DBIx::AdminEngine Monash::*
Sweep::*"
#PerlSwitches -Mblib=C:\Apache2
PerlRequire "C:/Apache2/conf/startup.pl"
Alias /perl/ "C:/Apache2/perl/
<Location /perl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
----><8----
I'll keep working on the original problem.
--
Cheers
Ron Savage, ron@savage.net.au on 24/02/2003
http://savage.net.au/index.html
Re: [MP2] Apache::Reload date bug
Posted by Stas Bekman <st...@stason.org>.
Ron Savage wrote:
> On Tue, 18 Feb 2003 12:56:38 +1100, Stas Bekman wrote:
>
>>perl -le 'warn("foo\n")'
>
>
> You got the quotes wrong for MS Windows, so I ran it twice:
>
> C:\Backup>perl -le "warn(qq|foo\n|)"
> foo
>
> C:\Backup>perl -le 'warn("foo\n")'
well, you've got the idea, right.
Perhaps someone on win32 can try to debug the behavior that you saw. I can't
reproduce it on my linux box.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: [MP2] Apache::Reload date bug
Posted by Ron Savage <ro...@savage.net.au>.
On Tue, 18 Feb 2003 12:56:38 +1100, Stas Bekman wrote:
>perl -le 'warn("foo\n")'
You got the quotes wrong for MS Windows, so I ran it twice:
C:\Backup>perl -le "warn(qq|foo\n|)"
foo
C:\Backup>perl -le 'warn("foo\n")'
C:\Backup>
--
Cheers
Ron Savage, ron@savage.net.au on 19/02/2003
http://savage.net.au/index.html
Re: [MP2] Apache::Reload date bug
Posted by Stas Bekman <st...@stason.org>.
Ron Savage wrote:
> Folks
>
> I don't know if this an Apache problem, or a mod_perl problem.
>
> Apache::Reload outputs a UTC date rather than a local date, when it
> encounters an error. Here's an excerpt from my log.
> Notice how the dates go Sun, Mon, ..., Sun.
>
> [Sun Feb 16 18:31:25 2003] [error] [client 127.0.0.1] Execution of
> C:/Apache2/cgi-bin/test/test-path-info.cgi aborted due to compilation
> errors., referer: http://127.0.0.1/cgi-bin/test/test-path-info.cgi
> [Mon Feb 17 10:44:04 2003] [error] [client 127.0.0.1] Premature end
> of script headers: menu-process-module.cgi, referer:
> http://127.0.0.1/cgi-bin/menu-process-module.cgi
> [Mon Feb 17 10:44:04 2003] [error] [client 127.0.0.1] Can't locate
> Module/MakeDist.pm in @INC (@INC contains: C:/Perl/lib
> C:/Perl/site/lib .) at C:/Apache2/cgi-bin/menu-process-module.cgi
> line 15., referer: http://127.0.0.1/cgi-bin/menu-process-module.cgi
> [Mon Feb 17 10:44:04 2003] [error] [client 127.0.0.1] BEGIN
> failed--compilation aborted at
> C:/Apache2/cgi-bin/menu-process-module.cgi line 15., referer:
> http://127.0.0.1/cgi-bin/menu-process-module.cgi
> [Sun Feb 16 23:49:41 2003] -e: Apache::Reload: Can't locate
> C:/Perl/site/lib//CGI/Explorer.pm
I wonder why do you get the timestamp in first place, Apache::Reload does:
warn("Apache::Reload: Can't locate $file\n"), next
unless defined $mtime and $mtime;
which is a pure perl call. Or does perl on windows adds a timestamp when
loggin warnings? In any case, I doubt this has anything to do with mod_perl.
The [client 127.0.0.1] errors come from Apache, Apache::Reload warnings are
coming from perl. check what do you get when you run:
perl -le 'warn("foo\n")'
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com