Hi --

I'm following up on a previous message (below),
sorry to break the thread in two.
In my first post, I was wondering my handler didn't
work.  I said "make test" worked fine for mod_perl.

Well, maybe.

Here's the output.



[EMAIL PROTECTED]:~/source/mod_perl-1.28> make test
(cd ../apache_1.3.28 &&
PERL5LIB=/home/aprk/source/mod_perl-1.28/lib: make)
make[1]: Entering directory
`/home/aprk/source/apache_1.3.28'
===> src
make[2]: Entering directory
`/home/aprk/source/apache_1.3.28'
make[3]: Entering directory
`/home/aprk/source/apache_1.3.28/src'
===> src/regex
make[4]: Nothing to be done for `all'.
<=== src/regex
===> src/os/unix
make[4]: Nothing to be done for `all'.
<=== src/os/unix
===> src/ap
make[4]: Nothing to be done for `all'.
<=== src/ap
===> src/main
make[4]: Nothing to be done for `all'.
<=== src/main
===> src/lib
<=== src/lib
===> src/modules
===> src/modules/standard
make[5]: Nothing to be done for `all'.
<=== src/modules/standard
===> src/modules/perl
make[5]: Nothing to be done for `all'.
<=== src/modules/perl
<=== src/modules
cc -c -I. -I/usr/local/lib/perl5/5.8.0/i686-linux/CORE
-I./os/unix -I./include   -DLINUX=22 -DMOD_PERL
-DUSE_PERL_SSI -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -DUSE_HSREGEX -DNO_DL_NEEDED
-fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm `./apaci`
modules.c
cc -c -I. -I/usr/local/lib/perl5/5.8.0/i686-linux/CORE
-I./os/unix -I./include   -DLINUX=22 -DMOD_PERL
-DUSE_PERL_SSI -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -DUSE_HSREGEX -DNO_DL_NEEDED
-fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm `./apaci`
buildmark.c
cc  -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI
-fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
-DUSE_HSREGEX -DNO_DL_NEEDED -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm `./apaci`    \
      -o httpd buildmark.o modules.o
modules/standard/libstandard.a modules/perl/libperl.a
main/libmain.a ./os/unix/libos.a ap/libap.a
regex/libregex.a   -lm -lcrypt -rdynamic 
-L/usr/local/lib
/usr/local/lib/perl5/5.8.0/i686-linux/auto/DynaLoader/DynaLoader.a
-L/usr/local/lib/perl5/5.8.0/i686-linux/CORE -lperl
-lnsl -ldl -lm -lc -lcrypt -lutil
make[3]: Leaving directory
`/home/aprk/source/apache_1.3.28/src'
make[2]: Leaving directory
`/home/aprk/source/apache_1.3.28'
make[2]: Entering directory
`/home/aprk/source/apache_1.3.28'
===> src/support
make[3]: Entering directory
`/home/aprk/source/apache_1.3.28/src/support'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/aprk/source/apache_1.3.28/src/support'
<=== src/support
make[2]: Leaving directory
`/home/aprk/source/apache_1.3.28'
<=== src
make[1]: Leaving directory
`/home/aprk/source/apache_1.3.28'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/Apache'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/Apache'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/Connection'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/Connection'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/Constants'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/Constants'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/File'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/File'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/Leak'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/Leak'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/Log'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/Log'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/ModuleConfig'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/ModuleConfig'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/PerlRunXS'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/PerlRunXS'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/Server'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/Server'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/Symbol'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/Symbol'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/Table'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/Table'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/URI'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/URI'
make[1]: Entering directory
`/home/aprk/source/mod_perl-1.28/Util'
make[1]: Leaving directory
`/home/aprk/source/mod_perl-1.28/Util'
cp t/conf/mod_perl_srm.conf t/conf/srm.conf
../apache_1.3.28/src/httpd -f `pwd`/t/conf/httpd.conf
-X -d `pwd`/t &
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...\c
done
/usr/local/bin/perl t/TEST 0
modules/actions.......ok
modules/cgi...........ok
modules/constants.....ok
modules/cookie........skipped
        all skipped: no reason given
modules/file..........ok
modules/httpdconf.....ok
modules/include.......ok
modules/log...........ok
modules/module........skipped
        all skipped: no reason given
modules/perlrun.......ok
modules/psections.....skipped
        all skipped: no reason given
modules/request.......skipped
        all skipped: no reason given
modules/src...........ok
modules/ssi...........ok
modules/stage.........skipped
        all skipped: no reason given
modules/status........ok
modules/symbol........skipped
        all skipped: no reason given
modules/uri...........ok
modules/util..........ok
internal/api..........ok
internal/auth.........ok
internal/croak........ok
internal/dirmagic.....ok
internal/error........ok
internal/headers......ok
internal/hooks........ok
internal/http-get.....ok
internal/http-post....ok
internal/proxy........ok
internal/redirect.....ok
internal/rwrite.......ok
internal/stacked......ok
internal/table........ok
internal/taint........ok
All tests successful, 6 tests skipped.
Files=34, Tests=400, 24 wallclock secs (19.31 cusr + 
1.50 csys = 20.81 CPU)
kill `cat t/logs/httpd.pid`
rm -f t/logs/httpd.pid
rm -f t/logs/error_log
[EMAIL PROTECTED]:~/source/mod_perl-1.28>
[EMAIL PROTECTED]:~/source/mod_perl-1.28>
[EMAIL PROTECTED]:~/source/mod_perl-1.28>




Why did it skip 6 tests?

For example, module and request.

I think these skipped tests could be 
what is causing my handlers to fail,
even though the server and my perl cgi works.

I have one dev box for development and one outside
box at an ISP.  I am getting these errors on the dev
box.  To see if the problem was my dev handler or my
dev conf files (vs. my dev mod_perl installation), I
tried the same handler on the outsider box and 
got the same error.

Seeking suggestions & help --

RKG



===================
PREVIOUS POST
===================
Hi. 

I need some help with handlers. 

I'm a linux newbie. I freshly installed RH 9. 
I built perl 5.8.0 from source. 

As non-root, I downloaded source for 
Apache 1.3.28 and mod_perl 1.28 
and built them, using the instructions here 

http://perl.apache.org/docs/1.0/guide/install.html#A_Summary_of_a_Basic_mod_perl_Installation


I've also been using Stas' book, Practical Mod Perl, 
and the mod_perl developer's cookbook. 

The only change I made to the 
A_Summary_of_a_Basic_mod_perl_Installation 
was using SU to root for the make install for 
mod_perl. 

The resulting Apache runs fine. 

The resuling mod_perl runs cgi-scripts fine. 

At times I'm running two servers on the same box, one 
listening 
to port 80 and one listening to port 8080. 
I turned off the ssl piece of both servers, as they 
were colliding 
on port (I think) 443. I'm not sure if this 2 server 
issue 
or the turning ssl is relevant to my problem. 

Now I'm trying to write my first mod_perl handler: 

PerlModule Apache::HandlerTest 
<Location /handlertest> 
SetHandler perl-script 
PerlHandler Apache::HandlerTest 
</Location> 


package Apache::HandlerTest; 
# File is called Apache/HandlerTest.pm 
# Path: 
/usr/lib/perl5/site_perl/5.8.0/Apache/HandlerTest.pm 

sub handler { 
my $r = shift; # Apache session object 
$r->content_type('text/html'); 
$r->send_http_header; 
$r->print( "Hello, world." ); 
} 


It dies with an 

Internal Server Error 
The server encountered an internal error or 
misconfiguration and was unable to complete your 
request 

Here's the end of the log 


[Thu Jul 31 18:34:08 2003] [error] [client 
192.168.1.2] Can't locate object method "content_type"

via package "Apache::RequestRec" at 
/usr/lib/perl5/site_perl/5.8.0/Apache/HandlerTest.pm 
line 6.! 
[Thu Jul 31 18:34:08 2003] [error] [client 
192.168.1.2] File does not exist: /var/www/error 

As the problem seesm related to finding things, I 
tried making 
the handler simpler by using no functions 

sub handler { 
print "HTTP/1.0 200 OK\n"; 
print "Content-Type: text/html\n\n"; 
print "<html><body>Hello</body></html>"; 
return 200; 
} 

This didn't work either -- 

[Thu Jul 31 18:42:57 2003] [error] [client 
192.168.1.2] Can't locate object method "PRINT" via 
package "Apache::RequestRec" at 
/usr/lib/perl5/site_perl/5.8.0/Apache/HandlerTest.pm 
line 13.! 
[Thu Jul 31 18:42:57 2003] [error] [client 
192.168.1.2] File does not exist: /var/www/error 

I guess the print is really a call to $r->print() 
(Practical Mod_perl p 238). 

This newcomer to mod-perl seeks any help on next 
steps. 

RKG 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Reply via email to