Jeff Pang wrote:
> Hi,lists,
> 
> I am new to mod_perl.I have a simple mod_perl script running under 
> Apache::Register.When it run,I found many error messages appeared in 
> logs/error_log.
> 
> The program is shown below:
> 
> use strict;
> use warnings;
> use CGI;
> use CGI::Cookie;
> use vars qw($q $sessionID);

Well, at first glance, try and not to use globals like these to pass
state around, it's bad practice and will cause you problems.

> $q = new CGI;
> 
> init();
> print_header();
> print_verify();

my $q = new CGI;
my $session_id = init($q);
print_header($q, $session_id);
print_verify($q, $session_id);

> The error messages in error_log are shown below:
> 
> ########################
> sub generate_sessionID {
>     return scalar localtime;
> }
> 
> }
> ;' called at 
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Apache/Registry.pm 
> line 183
>         Apache::Registry::compile('package Apache::ROOT::perl::login_2epl;use 
> Apache qw(exit);su...') called at 
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Apache/Registry.pm 
> line 134
>         Apache::Registry::handler('Apache=SCALAR(0x863ae64)') called at 
> /home/apache1.3/perl/login.pl line 26
>         eval {...} called at /home/apache1.3/perl/login.pl line 26
> Subroutine print_verify redefined at /home/apache1.3/perl/login.pl line 42.
>         eval 'F;
> 
>     print qq{</BODY></HTML>};
> 
> }

This doesn't look quite like an error_log entry, I can't tell exactly what's 
part
of the error log entry and what isn't. Can you take the time to read:
 http://perl.apache.org/docs/1.0/guide/help.html
and submit a more detailled report?

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Reply via email to