Re: Set-Cookie2

2003-08-14 Thread Jie Gao



On Tue, 5 Aug 2003, Stas Bekman wrote:

> Jie Gao wrote:
> > Hi All,
> >
> > Any idea if "Set-Cookie2:" is going to be implemented in CGI.pm? Lincohn?
>
> Jie, AFAIK, this has nothing to do with mod_perl. See:
> http://stein.cshl.org/WWW/software/CGI/#bugs

Sorry. Now let me ask a question that's related to mod_perl: does libapreq
support Set-Cookie2?

Regards,



Jie


Set-Cookie

2003-08-14 Thread Jie Gao
Hi All,

Any idea if "Set-Cookie2:" is going to be implemented in CGI.pm? Lincohn?

Regards,



Jie



Re: Trouble with Apache::Request

2003-07-31 Thread Jie Gao
Hi All,

perl-5.8.0 + mp1.99_10.
---

I am having problem trying to get /perl-status work.

It bombs out in Status.pm at the following location:

--
if (eval {require Apache::Request}) {
$newQ ||= sub { Apache::Request->new(@_) };
}
elsif (eval {require CGI}) {
$newQ ||= sub { CGI->new; };
}
else {
die "Need CGI.pm or Apache::Request to operate";
}
--

But shouldn't "Apache::Request" be "Apache::RequestRec"?

Sincerely,



Jie



Socket-based porotocol module: how to re-use connection?

2003-06-19 Thread Jie Gao
Hi All,

I am playing with a socket-based protocol module based on Stas'
MyApache::EchoSocket.

I wonder what is needed to enable the function of re-using connections?

In perl we can use this:

$server = IO::Socket::INET->new(LocalHost => "my.host.com",
LocalPort => 8899,
ReuseAddr => 1,
Proto => "tcp",
Listen=> 200 )

How is this implemented http in mod_perl via Apache2 without using http?

Any suggestions?

Regards,



Jie




get_server_port (was:Re: run_access_check)

2003-03-25 Thread Jie Gao
On Mon, 24 Mar 2003, Stas Bekman wrote:

> Jie Gao wrote:
> > Hi All,
> >
> > I am getting the following error mesg:
> >
> > Can't locate object method "run_access_checker" via package "Apache::RequestRec" 
> > at /usr/local/perl-5.8.0_threaded/lib/site_perl/5.8.0/xxx/.pm
> >
> > for the section:
> >
> > sub handler {
> > my Apache::Connection $c = shift;
> > my APR::Socket $socket = $c->client_socket;
> > my $r = Apache::RequestRec->new($c);
> > $r->location_merge(__PACKAGE__);
> > my $rc = $r->run_access_checker();
> > ..
> >
> >
> > Any idea why?
> >
> > I am using 2.0.44 with mp2 from cvs.
>
> Guessing that you haven't loaded Apache::HookRun.
>
> % lookup run_access_checker
> to use method 'run_access_checker' add:
>  use Apache::HookRun ();

Thanks, that worked.

I have run into another problem, though. I am writing a
PerlProcessConnectionHandler based on the example in "overview of
mod_perl-2.0". It's going to listen on two ports, and I need to know
which port is being used in order to set up other things. But I could
not get get_server_port work.

I have tried:

my $s = $r->server;
my $port = $s->get_server_port;

but got error message:

Can't locate object method "get_server_port" via package "Apache::Server" at 
/usr/local/perl-5.8.0_threaded/lib/site_perl/5.8.0/xxx.pm

I haven't been able to find relevant documentation.


Regards,



Jie



run_access_check

2003-03-23 Thread Jie Gao
Hi All,

I am getting the following error mesg:

Can't locate object method "run_access_checker" via package "Apache::RequestRec" at 
/usr/local/perl-5.8.0_threaded/lib/site_perl/5.8.0/xxx/.pm

for the section:

sub handler {
my Apache::Connection $c = shift;
my APR::Socket $socket = $c->client_socket;
my $r = Apache::RequestRec->new($c);
$r->location_merge(__PACKAGE__);
my $rc = $r->run_access_checker();
..


Any idea why?

I am using 2.0.44 with mp2 from cvs.

Sincerely,




Jie




Re: cvs version make test errors

2003-03-20 Thread Jie Gao
On Fri, 21 Mar 2003, Stas Bekman wrote:

> Date: Fri, 21 Mar 2003 14:09:11 +1100
> From: Stas Bekman <[EMAIL PROTECTED]>
> To: Jie Gao <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: cvs version make test errors
>
> Jie Gao wrote:
> > Hi All,
> >
> > I got a version from cvs today and make test fails with:
>
> > special_blocks.ok 5/12unable to find interp 
> > de76d477-58b9-0310-b94d-dd991812e62e
>
> Thanks Jie.
>
> Your bug report missing the mod_perl and apache information. You should have
> run t/REPORT to get this as explained here:
> http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
> I can't tell whether you are running a threaded-mpm or a prefork.
>
> However, this is not a bug in mod_perl, but a current limitation in one of the
> testing framework functionalities. Certain tests need to make sure that they
> hit the same interpreter twice in a row (e.g. to test the closure effect),
> apparently the current implementation doesn't work well on several platforms,
> win32 included.
>
> If somebody (preferrably on a platform that has this problem) can look at this
> issue and resolve it, that would be a great help.
>
> You can find the code in Apache-Test/lib/Apache/TestRequest.pm and you have
> several tests that use it (grep for 'same_interp_tie'). The currently used
> algorithm is very simple: the first request stores the unique id of the perl
> interpreter in the response headers and on the following requests the client
> supplies this header. Apache::TestRequest resubmits the request again and
> again till it hits the same interpreter and only then returns the response to
> the client. After TRY_TIMES (50) it'll give up and return an error. I'm not
> sure whether raising of this number to let's say 500 will help to solve the
> problem.
>
> Your help is appreciated.

Guess what, I ran the test again, it passed. :-) I figure this had to
do with the load of the machine.

Anyway, I was using threaded-mpm with apache 2.0.44.

Many thanks,


Jie



cvs version make test errors

2003-03-20 Thread Jie Gao
Hi All,

I got a version from cvs today and make test fails with:

protocol/echo_filter...ok
protocol/eliza.skipped
all skipped: cannot find module 'Chatbot::Eliza'
All tests successful, 3 tests skipped.
Files=115, Tests=610, 230 wallclock secs (115.33 cusr + 30.32 csys = 145.65 CPU)
*** server localhost:8529 shutdown
*** port 8529 still in use...
done
cd ModPerl-Registry && gmake test
gmake[1]: Entering directory `/de1/src/lima/modperl-2.0/ModPerl-Registry'
/usr/local/perl-5.8.0_threaded/bin/perl -I../blib/arch/Apache2 -I../blib/lib/Apache2 \
t/TEST -clean
APACHE_USER= APACHE_GROUP= APACHE_PORT= APACHE= APXS= \
/usr/local/perl-5.8.0_threaded/bin/perl -I../blib/arch/Apache2 -I../blib/lib/Apache2 \
t/TEST
*** root mode: changing the fs ownership to 'nobody' (60001:60001)
/usr/local/WASM_Sessions_Checker_apache_2.0.44/bin/httpd  -d
/de1/src/lima/modperl-2.0/ModPerl-Registry/t -f
/de1/src/lima/modperl-2.0/ModPerl-Registry/t/conf/httpd.conf -DAPACHE2 
-DPERL_USEITHREADS
using Apache/2.0.44 (worker MPM)

waiting for server to start: ...
waiting for server to start: ok (waited 14 secs)
server localhost:8529 started
206ok
404ok
500ok
bad_scriptsok
basic..ok
closureok
perlrun_requireok
redirect...ok
special_blocks.ok 5/12unable to find interp de76d477-58b9-0310-b94d-dd991812e62e
special_blocks.dubious
Test returned status 29 (wstat 7424, 0x1d00)
DIED. FAILED tests 6-12
Failed 7/12 tests, 41.67% okay
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
---
special_blocks.t   29  7424127  58.33%  6-12
*** server localhost:8529 shutdown
!!! error running tests (please examine t/logs/error_log)
gmake[1]: *** [run_tests] Error 1
gmake[1]: Leaving directory `/de1/src/lima/modperl-2.0/ModPerl-Registry'
gmake: *** [run_tests] Error 2

Sincerely,



Jie




perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
osname=solaris, osvers=2.7, archname=sun4-solaris-thread-multi
uname='sunos lima 5.7 generic_106541-23 sun4u sparc sunw,ultra-80 '
config_args='-Dcc=gcc -B/usr/ccs/bin/ -Doptimize=-O2 
-Dprefix=/usr/local/perl-5.8.0_threaded
-Dusethreads -Ui_db -Uuselargefiles -Uusemymalloc -Dlocincpth=/usr/local/include 
/opt/local/include
/include /usr/include -Dloclibpth=/usr/local/lib /opt/local/lib /usr/lib /usr/ccs/lib'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='gcc -B/usr/ccs/bin/', ccflags ='-D_REENTRANT -fno-strict-aliasing 
-I/opt/local/include',
optimize='-O2',
cppflags='-D_REENTRANT -fno-strict-aliasing -I/opt/local/include'
ccversion='', gccversion='3.2.2', gccosandvers='solaris2.7'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
alignbytes=8, prototype=define
  Linker and Libraries:
ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib -L/opt/local/lib -L/usr/lib 
-L/usr/ccs/lib'
libpth=/usr/local/lib /opt/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -lgdbm -ldl -lm -lrt -lpthread -lc
perllibs=-lsocket -lnsl -ldl -lm -lrt -lpthread -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib -L/usr/lib 
-L/usr/ccs/lib'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT
  Built under solaris
  Compiled at Mar 21 2003 11:50:43
  @INC:
/usr/local/perl-5.8.0_threaded/lib/5.8.0/sun4-solaris-thread-multi
/usr/local/perl-5.8.0_threaded/lib/5.8.0
/usr/local/perl-5.8.0_threaded/lib/site_perl/5.8.0/sun4-solaris-thread-multi
/usr/local/perl-5.8.0_threaded/lib/site_perl/5.8.0
/usr/local/perl-5.8.0_threaded/lib/site_perl
.




Invalid command 'PerlCleanupHandler'

2003-02-26 Thread Jie Gao
Hi All,

On redhat 8 using mod_perl-1.99_05-3


I have the folloing in httpd.conf:

PerlCleanupHandler "sub { %ENV = () }"

in VirtualHost, and am getting:

Invalid command 'PerlCleanupHandler', perhaps mis-spelled or defined by a module not 
included in the
server configuration

Not a problem with mod_perl 1.

Any help is appreciated.





Jie




Re: mod_perl fails tests

2002-12-17 Thread Jie Gao
On Tue, 17 Dec 2002 [EMAIL PROTECTED] wrote:

> I am having some trouble installing mod_perl on my redhat linux 8.0 box.  I
>
> successfully installed apache 2.0.43 from source and placed it in the
> /usr/local/apache2 directory.  In addition, I downloaded the latest version of
> mod_perl from cvs. I successfully used the following command to generate the
> makefile: perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2 MP_INST_APACHE2=1.

I have a question related to this: Why the param "MP_INST_APACHE2="? It would
be good to be able to install apache in a user defined location, rather than
only one location possible. This makes upgrades a bit risky. I maybe wrong, as
documentation for apache2 is nowhere as clear as for apache 1.3*.

Regards,



Jie

> Even though the make process was successful the make test process was not.  As
> clear as I can tell from the error message that I listed below, mod_perl is
> looking for apache components in
> /home/software/apache_cvs/modperl-2.0/t/conf/httpd .conf which is clearly
> wrong since my httpd.conf file is in /usr/local/apache2/conf.
>
> Here is the error message:
>
> waiting for server to start: ...[Tue Dec 17 17:37:17 2002] [info] 19 Apache::
> modules loaded
> [Tue Dec 17 17:37:17 2002] [info] 5 APR:: modules loaded
> [Tue Dec 17 17:37:17 2002] [info] base server + 6 vhosts ready to run tests
> ..[Tue Dec 17 17:37:19 2002] [info] 19 Apache:: modules loaded
> [Tue Dec 17 17:37:20 2002] [info] 5 APR:: modules loaded
> .[Tue Dec 17 17:37:20 2002] [info] base server + 6 vhosts ready to run tests
> Syntax error on line 693 of
> /home/software/apache_cvs/modperl-2.0/t/conf/httpd.conf:
> Can't locate CGI.pm in @INC (@INC contains:
> /home/software/apache_cvs/modperl-2.0/blib/lib/Apache2
> /home/software/apache_cvs/modperl-2.0/blib/arch/Apache2
> /home/software/apache_cvs/modperl-2.0/Apache-Test/lib
> /home/software/apache_cvs/modperl-2.0/lib
> /home/software/apache_cvs/modperl-2.0/blib/lib
> /home/software/apache_cvs/modperl-2.0/blib/arch
> /home/software/apache_cvs/modperl-2.0/t/response
> /home/software/apache_cvs/modperl-2.0/t/protocol
> /home/software/apache_cvs/modperl-2.0/t/hooks
> /home/software/apache_cvs/modperl-2.0/t/filter
> /home/software/apache_cvs/modperl-2.0/t
> /home/software/apache_cvs/modperl-2.0/t/htdocs/testdirective/perlmodule-vh
> /home/software/apache_cvs/modperl-2.0/t/htdocs/testdirective/main
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl) at (eval 22) line
> 3.
>
> !!!
> server has died with status 255 (t/logs/error_log wasn't created, start the
> server in the debug mode)
> make: *** [run_tests] Error 143
>
>
> Thanks for your help-
> Rodney
>
>





re: solaris 2.6, mod_perl 1.27, apache 1.3.27, make test fails

2002-10-28 Thread Jie Gao
Do you have multiple versions of perl installed?

Try a clean installation of perl and use the same
compiler and same flags in building everything.

Regards,



Jie

On Mon, 28 Oct 2002, John E. Mendenhall wrote:

> Date: Mon, 28 Oct 2002 12:44:07 -0800 (PST)
> From: John E. Mendenhall <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: re: solaris 2.6, mod_perl 1.27, apache 1.3.27, make test fails
>
> Gurus,
>
> I have compiled mod_perl 1.27 with apache 1.3.27 under perl 5.8.0, solaris
> 2.6, using gcc 2.7.2.3.  When I run the make test, it fails with the
> following in the error_log:
>
>   /usr/local/bin/perl5.8.0 t/TEST 0
>   modules/actions...ok
>   modules/cgi...FAILED test 4
>   Failed 1/5 tests, 80.00% okay
>   modules/constants.ok
>   modules/cookieskipped
>   all skipped: no reason given
>   modules/file..ok
>   modules/httpdconf.ok
>   modules/include...ok
>   modules/log...ok
>   modules/moduleskipped
>   all skipped: no reason given
>   modules/perlrun...skipped
>   all skipped: no reason given
>   modules/psections.skipped
>   all skipped: no reason given
>   modules/request...FAILED tests 1-10
>   Failed 10/10 tests, 0.00% okay
>   modules/src...ok
>   modules/stage.skipped
>   all skipped: no reason given
>   modules/statusfetch /perl/perl-status failed!
>   modules/statusdubious
>   Test returned status 255 (wstat 65280, 0xff00)
>   DIED. FAILED tests 1-7
>   Failed 7/7 tests, 0.00% okay
>   modules/symbolskipped
>   all skipped: no reason given
>   modules/uri...skipped
>   all skipped: no reason given
>   modules/util..skipped
>   all skipped: no reason given
>   internal/...
>
> The remainder of the tests fail for the most part because the apache
> server dies somewhere around the modules/request tests, most likely
> before.
>
> The logs/error_log shows:
>
>   [notice] Destruction->DESTROY called for $global_object
>   Subroutine fileparse_set_fstype redefined at
>/usr/local/lib/perl5/5.8.0/File/Basename.pm line 154.
>   Subroutine fileparse redefined at
>/usr/local/lib/perl5/5.8.0/File/Basename.pm line 168.
>   Subroutine basename redefined at
>/usr/local/lib/perl5/5.8.0/File/Basename.pm line 235.
>   Subroutine dirname redefined at
>/usr/local/lib/perl5/5.8.0/File/Basename.pm line 248.
>   Constant subroutine CGI::XHTML_DTD redefined at
>/usr/local/lib/perl5/5.8.0/constant.pm line 108.
>   [Mon Oct 28 12:29:58 2002] [warn] [notice] child_init for process 19757,
>report any problems to [no address given]
>
> When I attempt to run the single test modules/request, I get the following
> output:
>
> % ./TEST -v modules/request
> modules/requestmodule Apache::Request is installed
> 1..10
> not ok 1
> HTTP/1.1 200 OK
> Connection: close
> Date: Mon, 28 Oct 2002 20:32:25 GMT
> Server: Apache/1.3.27 (Unix) mod_perl/1.27 Perl/v5.8.0 mod_layout/3.2
> Content-Type: text/plain
> Client-Date: Mon, 28 Oct 2002 20:32:25 GMT
> Client-Peer: 127.0.0.1:8529
>
> 1..0
> Test header seen more than once!
> /usr/local/lib/perl5/site_perl/Apache/Request.pm
>
> not ok 2
> HTTP/1.1 200 OK
> Connection: close
> Date: Mon, 28 Oct 2002 20:32:25 GMT
> Server: Apache/1.3.27 (Unix) mod_perl/1.27 Perl/v5.8.0 mod_layout/3.2
> Content-Type: text/plain
> Client-Date: Mon, 28 Oct 2002 20:32:25 GMT
> Client-Peer: 127.0.0.1:8529
>
> 1..0
> Test header seen more than once!
> /usr/local/lib/perl5/site_perl/Apache/Request.pm
>
> not ok 3
> /usr/local/lib/perl5/5.8.0/pod/perlfunc.pod should have 6496 lines
> (request-upload.pl says: )
> not ok 4
> not ok 5
> /usr/local/lib/perl5/5.8.0/pod/perlpod.pod should have 685 lines
> (request-upload.pl says: )
> not ok 6
> not ok 7
> /usr/local/lib/perl5/5.8.0/pod/perlxs.pod should have 1980 lines
> (request-upload.pl says: )
> not ok 8
> not ok 9
> /usr/local/src/mod_perl/mod_perl-1.27/t/docs/book.gif should have 113
> lines (request-upload.pl says: )
> not ok 10
>
> When I try to run all the tests that went before that, all running them as
> single tests, none of them cause the server to die.  The modules/cgi test
> causes a single on error #4 for that test.  The output is:
>
> ServerError: Insecure dependency in sysopen while running with -T switch
> at (eval 197) line 8.
>
> error-notes is also set
> dump of %@:
> /perl/cgi.pl = Insecure dependency in sysopen while running with -T switch
> at (eval 197) line 8.
>
> The output in the logs/error_log is:
>
> [Mon Oct 28 12:37:52 2002] [error] Insecure dependency in sysopen while
> running with -T switch at (eval 197) line 8.
>
> Background:
>
> I have used mod_perl up through versions 1.15, using perl 5.004_04, and
> earlier versions of Apache.  I am trying to upgrade to the latest stable
> releases of everything and it just does not seem to be working.  I have
> checked the list archives as 

Re: mod_perl & mod_php

2002-08-29 Thread Jie Gao

On Thu, 29 Aug 2002, Jesse Erlbaum wrote:

> > Well what you said is true. I actuallay had perl 5.6.1 but I
> > tried to use an
> > old httpd executable compiled with 5.6.0. Adding directories to @INC would
> > help me but each time before I would start httpd, I'd have to do that.
> > Instead I recompiled mod_perl/apache/ssl/php bundle. And that helped (for
> > sure)
>
>
> I notice that you are using mod_perl AND mod_php.
>
> I have a general question for the list:  Do people often use BOTH of these
> environments at the same time?  It seems to me that there would be little
> benefit to using both.  Am I mistaken?

It happens when somebody wants to use php and you don't want to use it.



Jie




Re: Apache::Session - What goes in session?

2002-08-20 Thread Jie Gao

On Tue, 20 Aug 2002, Perrin Harkins wrote:

> Jie Gao wrote:
>  > I wish some of these modules would be able to "touch" cached data so that
>  > it would expire cache entries on "last-accessed" rather than on the time
>  > the entries were created.
>
> Why?  People used to do that with cached because they had limited space
> and wanted to purge the cache with an LRU algorithm to keep size down,
> but disk space is too cheap to worry about now.
>
> If an item in the cache is okay to stay there as long as people are
> accessing it, you are essentially saying that cached items never become
> invalid.  In that case, why bother ever deleting any of them?

There are cases in which it is desirable to expire an entry which
hasn't been used for a certain period of time; authenticated sessions
data, for example. Absolute expiration is indeed needed, as well.

Regards,



Jie




Re: Apache::Session - What goes in session?

2002-08-20 Thread Jie Gao

On Tue, 20 Aug 2002, Perrin Harkins wrote:

> Date: Tue, 20 Aug 2002 13:12:29 -0400
> From: Perrin Harkins <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: Dave Rolsky <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Subject: Re: Apache::Session - What goes in session?
>
> [EMAIL PROTECTED] wrote:
> > We are investigating using IPC rather then a file based structure but
> > its purely investigation at this point.
> >
> > What are the speed diffs between an IPC cache and a Berkely DB cache. My
> > gut instinct always screams 'Stay Off The Disk' but my gut is not always
> > right.. Ok, rarely right.. ;)
>
> Most of the shared memory modules are much slower than Berkeley DB.  The
> fastest option around is IPC::MM, but data you store in that does not
> persist if you restart the server which is a problem for some.
> BerkeleyDB (the new one, not DB_File) is also very fast, and other
> options like Cache::Mmap and Cache::FileCache are much faster than
> anything based on IPC::Sharelite and the like.

I wish some of these modules would be able to "touch" cached data so that
it would expire cache entries on "last-accessed" rather than on the time
the entries were created.

Regards,



Jie




Re: mod_proxy_add_forward.c

2002-07-21 Thread Jie Gao

On Mon, 22 Jul 2002, Thomas Eibner wrote:

> On Mon, Jul 22, 2002 at 08:34:08AM +1000, Jie Gao wrote:
> > On Sat, 20 Jul 2002, Ask Bjoern Hansen wrote:
> >
> > > As you may know then the proxy module in httpd 2.0 incorporates the
> > > X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server
> > > functionality of mod_proxy_add_forward.c.
> >
> > What are the differences between them?
>
> I believe there is a difference in what headers was decided on to send in
> mod_proxy.
>
> mod_proxy_add_forward.c:
> X-Forwarded-For
> X-Host
> X-Server-Hostname
> mod_proxy:
> X-Forwarded-For
> X-Forwarded-Host
> X-Forwarded-Server
>
> > I have:
> >
> > ProxyPass /my-bin/ http://127.0.0.1:8081/my-bin/
> > ProxyPassReverse /my-bin/ http://127.0.0.1:8081/my-bin/
> >
> > and I still see
> >
> > 127.0.0.1 - - [22/Jul/2002:08:32:53 +1000] "GET /my-bin 
>
> That's what's supposed to happen. On the backend you have the headers you
> can use to determine the original client.
>
> I've created a module (both 1.3 and 2.0) to take advantage of the headers
> called mod_rpaf [1] (reverse proxy add forward) in the backend.

That's great. But what I am after is the difference between

X-Forwarded-For
X-Forwarded-Host
X-Forwarded-Server

.

Regards,



Jie





Re: mod_proxy_add_forward.c

2002-07-21 Thread Jie Gao

On Sat, 20 Jul 2002, Ask Bjoern Hansen wrote:

> As you may know then the proxy module in httpd 2.0 incorporates the
> X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server
> functionality of mod_proxy_add_forward.c.

What are the differences between them?

I have:

ProxyPass /my-bin/ http://127.0.0.1:8081/my-bin/
ProxyPassReverse /my-bin/ http://127.0.0.1:8081/my-bin/

and I still see

127.0.0.1 - - [22/Jul/2002:08:32:53 +1000] "GET /my-bin 

in the log file of Apache 1.3.26.

Regards,



Jie

> I just noticed that Thomas Eibner got the proxy people to put it
> into apache 1.3 too since 1.3.25.  Yay.  :-)
>
> mod_proxy even seems to figure it out on it's own when it's doing a
> "reverse proxy" request.
>
>
>  - ask (working on his performance tuning talk for oscon)
>
> --
> ask bjoern hansen, http://askbjoernhansen.com/ !try; do();
>
>





Re: compatibility problem

2002-05-23 Thread Jie Gao

On Wed, 22 May 2002, Doug MacEachern wrote:

> On Thu, 23 May 2002, Jie Gao wrote:
>
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 1024 (LWP 15349)]
> > 0x4031575d in modperl_mgv_lookup (symbol=0x0) at modperl_mgv.c:134
> > 134 if (!symbol->hash) {
> > (gdb) bt
> > #0  0x4031575d in modperl_mgv_lookup (symbol=0x0) at modperl_mgv.c:134
> > #1  0x403103ed in modperl_callback (handler=0x83dcd68, p=0x83d3438, r=0x83d3470, 
>s=0x80d1540, args=0x8131110)
> > at modperl_callback.c:19
>
> this is with modperl-2.0 from cvs?  if you have a simple test case to
> reproduce, that would help.  looks related to method handlers based on
> your stacktrace.

I have found the following:

In httpd.conf:

 # Document root.
Options All
AllowOverride All
Order allow,deny
allow from all


"Segmentation fault" happens when accessing /export/softwares/data, a
subdirectory which does not have an .htaccess file itself, but a
subdirectory of which has an .htaccess file containing:

IndexOptions FancyIndexing NameWidth=* ScanHTMLTitles IconsAreLinks
PerlAuthenHandler XXX::AuthCookieHandler->authen
PerlAuthzHandler XXX::AuthCookieHandler->authz
AuthType XXX
AuthName XXX
PerlSetVar AuthenLoginPageLocation 'https://xxx.xxx.xxx.xx/login.cgi'
PerlSetVar VirtualServerName xxx.xxx.xxx.xxx.
PerlSetVar AuthCookieDebug 0
PerlSetVar TimeOut 10
require group /export/softserv/acl/nero
ErrorDocument 403 /server_response/software_403.html

Changing "AllowOverride All" to "AllowOverride None" does not incur
a "Segmentation fault".

The .htaccess file might have a problem, but having a problem accessing
the parent directory makes it very hard to debug.

Regards,



Jie




Re: compatibility problem

2002-05-22 Thread Jie Gao

On Wed, 22 May 2002, Doug MacEachern wrote:

> On Thu, 23 May 2002, Jie Gao wrote:
>
> > I am also getting:
> >
> > [Thu May 23 14:11:45 2002] [notice] child pid 32213 exit signal Segmentation fault 
>(11)
> >
> > when running my 1.3 module. I couldn't find any coredump, though. Anyone
> > can help?
>
> modperl-1.xx/SUPPORT:
>  % gdb ../apache_x.xx/src/httpd
>  (gdb) run -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t
>  [now make request that causes core dump]
>  (gdb) bt

OK, here you are:

(gdb) run -X -f /usr/local/apache2/conf/httpd.conf -d /usr/local/apache2
Starting program: /usr/local/apache2/bin/httpd -X -f 
/usr/local/apache2/conf/httpd.conf -d /usr/local/apache2
[New Thread 1024 (LWP 15349)]
bt

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 15349)]
0x4031575d in modperl_mgv_lookup (symbol=0x0) at modperl_mgv.c:134
134 if (!symbol->hash) {
(gdb) bt
#0  0x4031575d in modperl_mgv_lookup (symbol=0x0) at modperl_mgv.c:134
#1  0x403103ed in modperl_callback (handler=0x83dcd68, p=0x83d3438, r=0x83d3470, 
s=0x80d1540, args=0x8131110)
at modperl_callback.c:19
#2  0x40310aec in modperl_callback_run_handlers (idx=2, type=5, r=0x83d3470, c=0x0, 
s=0x80d1540, pconf=0x0,
plog=0x0,
ptemp=0x0) at modperl_callback.c:175
#3  0x40310b9a in modperl_callback_per_dir (idx=2, r=0x83d3470) at 
modperl_callback.c:199
#4  0x403186f0 in modperl_authen_handler (r=0x83d3470) at modperl_hooks.c:42
#5  0x0807734a in ap_run_check_user_id (r=0x83d3470) at request.c:111
#6  0x08077b31 in ap_process_request_internal (r=0x83d3470) at request.c:220
#7  0x08064715 in ap_process_request (r=0x83d3470) at http_request.c:259
#8  0x08060c4d in ap_process_http_connection (c=0x83cd528) at http_core.c:291
#9  0x0806e3e2 in ap_run_process_connection (c=0x83cd528) at connection.c:85
#10 0x08065a85 in child_main (child_num_arg=0) at prefork.c:671
#11 0x08065b38 in make_child (s=0x8098790, slot=0) at prefork.c:711
#12 0x08065c22 in startup_children (number_to_start=10) at prefork.c:783
#13 0x08065f24 in ap_mpm_run (_pconf=0x8096a40, plog=0x80c0ae8, s=0x8098790) at 
prefork.c:999
#14 0x0806ac0f in main (argc=6, argv=0xb944) at main.c:632
#15 0x40109647 in __libc_start_main (main=0x806a500 , argc=6, ubp_av=0xb944, 
init=0x805e6c4 <_init>,
fini=0x80802a0 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xb93c) at
../sysdeps/generic/libc-start.c:129
(gdb)

Subsequent requests hang.

Regards,



Jie





Re: compatibility problem

2002-05-22 Thread Jie Gao

On Mon, 20 May 2002, Doug MacEachern wrote:

> On Fri, 17 May 2002, Jie Gao wrote:
>
> > use Apache::Constants qw(:common :response M_GET M_POST AUTH_REQUIRED REDIRECT);
>
> the :response group in 1.x consists of names which apache has deprecated
> in 1.3.x and removed in 2.0, for which there are HTTP_* names that replace
> the old names.  so for example, if you had imported the :response group to
> use 'BAD_GATEWAY', you should instead explicity import HTTP_BAD_GATEWAY,
> which will work with both 1.x and 2.x.

I put this in my module:

use Apache::Constants qw(:common BAD_GATEWAY M_GET M_POST AUTH_REQUIRED REDIRECT 
FORBIDDEN SERVER_ERROR);

and "make test" says BAD_GATEWAY is not exported by Apache::Constants.

Also perl-status doesn't seem to be functioning:

[Thu May 23 14:14:43 2002] [error] [client 129.xx.xx.xx] Undefined subroutine 
&Apache::Constants::SERVER_VERSION
called at /usr/lib/perl5/site_perl/5.6.1/i386-linux/Apache/Status.pm line 86.

I am also getting:

[Thu May 23 14:11:45 2002] [notice] child pid 32213 exit signal Segmentation fault (11)

when running my 1.3 module. I couldn't find any coredump, though. Anyone
can help?

Regards,



Jie




Re: Trouble installing mod_perl module files

2002-05-21 Thread Jie Gao

On Tue, 21 May 2002, Vicki Brown wrote:

> I just installed Apache 1.3.22 (that's what's in the FreeBSD ports
> collection).  We were previously running 1.3.14
>
> I installed mod_perl-1.26 into this with
>
>  perl Makefile.PL \
> APACHE_SRC=/usr/ports/www/apache13/work/apache_1.3.22/src \
> DO_HTTPD=1 \
> USE_APACI=1 \
> PREP_HTTPD=1 \
> EVERYTHING=1
>   make
>   make install
>
> Then I (re)built and (re)installed Apache. When I finished, I ran
> /usr/local/apache/bin/apachectl configtest and I get
>
>  Syntax error on line 207 of /usr/local/apache/conf/httpd.conf:
>  Cannot load /usr/local/apache/libexec/apache/mod_mmap_static.so into server:
>  Cannot open "/usr/local/apache/libexec/apache/mod_mmap_static.so"
>
> It's true; there are no modules in /usr/local/apache/libexec/ - nothing much
> is
> in that directory. I've rebuild and re-installed both mod_perl and apache to
> no avail.
>
> The LoadModule lines are being added to httpd.conf
>
>   LoadModule mmap_static_module libexec/apache/mod_mmap_static.so
>   ...
>
>   ClearModuleList
>   AddModule mod_mmap_static.c

You need to configure Apache to build those modules, either statically or
as dso, with:

--enable-module=NAME
--enable-shared=NAME

Read the file INSTALL in the Apache distribution.

Regards,




Jie




Re: compile time errors

2002-05-21 Thread Jie Gao

On Tue, 21 May 2002, m31 wrote:

> I'm sorry (i wass in a rush), the errors come up when I run make test,
> the `perl Makefile.pl` works fine. (on OSX 10.1.4 (Darwin 5.4),
> Perl/5.6.0, mod_perl/1.25, apache/1.3.23)
>
> $ make test
> ...some more stuff
> 
> /usr/bin/perl t/TEST 0
> Can't locate object method "new" via package "URI::URL" at
> ../blib/lib/Apache/test.pm line 252.
> make: *** [run_tests] Error 255

http://groups.yahoo.com/group/modperl/message/42895




Jie




Re: make test problem

2002-05-19 Thread Jie Gao

On Sun, 19 May 2002, Doug MacEachern wrote:

> On Mon, 20 May 2002, Jie Gao wrote:
>
> > I've found Apache 2.0.36 doesn't work with mod_perl-1.99_01 on redhat 7.1.
>
> you can use modperl from cvs with .36 or wait for modperl 1.99_02
> (sometime this week).

Just got one from cvs and 'make test' hangs on apr/util:

/usr/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \
t/TEST -clean
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -clean
APACHE_USER= APXS= APACHE_PORT= APACHE_GROUP= APACHE= \
/usr/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \
t/TEST
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST
/usr/local/apache2/bin/httpd  -d /export/src/modperl-2.0/t -f 
/export/src/modperl-2.0/t/conf/httpd.conf -DAPACHE2
using Apache/2.0.36 (prefork MPM)

waiting for server to start: ok (waited 0 secs)
server localhost.localdomain:8529 started
server localhost.localdomain:8530 listening (TestDirective::perlrequire)
server localhost.localdomain:8531 listening (TestDirective::perlmodule)
server localhost.localdomain:8532 listening (TestProtocol::echo)
server localhost.localdomain:8533 listening (TestProtocol::echo_filter)
server localhost.localdomain:8534 listening (TestProtocol::eliza)
server localhost.localdomain:8535 listening (TestFilter::input_msg)
apache/cgihandler...ok
apache/compat...ok
apache/compat2..ok
apache/conftree.ok
apache/constantsok
apache/post.ok
apache/read.ok
apache/scanhdrs.ok
apache/subprocess...skipped: perl < 5.7.3
apache/writeok
api/access..ok
api/aplog...ok
api/conn_recok
api/lookup_uri..ok
api/lookup_uri2.ok
api/module..ok
api/r_subclass..ok
api/request_rec.ok
api/responseok
api/rutil...ok
api/send_fd.ok
api/sendfileok
api/server_rec..ok
api/server_util.ok
api/uri.ok
apr/base64..ok
apr/constants...ok
apr/dateok
apr/netlib..ok
apr/perlio..skipped: iolayers is not available with this version of Perl
apr/poolok
apr/string..ok
apr/table...ok
apr/util


perl -V

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=linux, osvers=2.4.17-0.13smp, archname=i386-linux
uname='linux daffy.perf.redhat.com 2.4.17-0.13smp #1 smp fri feb 1 10:30:48 est 
2002 i686 unknown '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -Dcf_by=Red Hat, 
Inc. -Dcccdlflags=-fPIC
-Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Uusethreads -Uuseithreads 
-Uuselargefiles -Dd_dosuid
-Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm 
-Dlocincpth='
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include',
optimize='-O2 -march=i386 -mcpu=i686',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.1 2.96-98)', 
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options:
  Built under linux
  Compiled at Feb 20 2002 15:01:16
  @INC:
/usr/lib/perl5/5.6.1/i386-linux
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i386-linux
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl


Regards,



Jie

> > With apache 2.0.35, I'm getting:
> ...
> > Cannot load /usr/local/apache2/modules/mod_rewrite.so into server:
> > /usr/local/apache2/modules/mod_rewrite.so:
> > undefined symbol: apr_group_name_get
>
> looks like mod_rewrite that was compiled with .36 is still in the .35
> install tree.
>
>
>





make test problem

2002-05-19 Thread Jie Gao

Hi All,

uname -a:

Linux xxx 2.4.17-02-shuckle #8 Thu Apr 18 13:15:58 EST 2002 i686 unknown

I've found Apache 2.0.36 doesn't work with mod_perl-1.99_01 on redhat 7.1.

With apache 2.0.35, I'm getting:

make test

...

/usr/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \
t/TEST -clean
setting ulimit to allow core files
ulimit -c unlimited; t/TEST -clean
APACHE_USER= APXS= APACHE_PORT= APACHE_GROUP= APACHE= \
/usr/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \
t/TEST
setting ulimit to allow core files
ulimit -c unlimited; t/TEST
/usr/local/apache2/bin/httpd  -d /export/src/mod_perl-1.99_01/t -f 
/export/src/mod_perl-1.99_01/t/conf/httpd.conf
-DAPACHE2
using Apache/2.0.35 (prefork MPM)
waiting for server to start: 00:00Syntax error on line 11 of 
/export/src/mod_perl-1.99_01/t/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_rewrite.so into server: 
/usr/local/apache2/modules/mod_rewrite.so:
undefined symbol: apr_group_name_get

server has died with status 1 (t/logs/error_log wasn't created, start the server in 
the debug mode)
make: *** [run_tests] Error 143


httpd was configured as:

./configure \
--prefix=/usr/local/apache2 \
--with-mpm=prefork \
--enable-so \
--enable-mods-shared=mod_rewrite \
--enable-module=most

Any ideas?




Jie




compatibility problem

2002-05-16 Thread Jie Gao

Hi all,

I've been trying to get httpd-2.0.35 + mod_perl-1.99_01 work with backward
compatibility.

MY startupl.pl:

#! /usr/bin/perl
use lib '/usr/lib/perl5/site_perl/5.6.1/i386-linux/Apache2';
use strict;
use Apache::compat ();
use Apache2 ();
use My::AuthCookieHandler;
1;

and this script won't run to finish with the error:

unknown group `response' at /usr/lib/perl5/site_perl/5.6.1/My/AuthCookieHandler.pm 
line 6.
BEGIN failed--compilation aborted at 
/usr/lib/perl5/site_perl/5.6.1/My/AuthCookieHandler.pm line 6.
Compilation failed in require at ./startup.pl line 6.
BEGIN failed--compilation aborted at ./startup.pl line 6.

And this is the line in question:

use Apache::Constants qw(:common :response M_GET M_POST AUTH_REQUIRED REDIRECT);

If I take out response, it croaks at "REDIRECT".

Any ideas why?

Thanks,



Jie




Re: mod_perl-1.99_01 make test fails

2002-04-08 Thread Jie Gao

Sorry, I got the wrong version. :-(


Jie

On Tue, 9 Apr 2002, Jie Gao wrote:

> Date: Tue, 9 Apr 2002 16:25:24 +1000 (EST)
> From: Jie Gao <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: mod_perl-1.99_01 make test fails
>
> Hi Doug,
>
> Apache 2.0.35 + modperl_20020409042640
> uname -a:
> Linux xxx.xxx.xx.xx 2.4.18-01-shuckle #4 Fri Apr 5 12:42:54 EST 2002 i686 unknown
>
> perl -V
>   Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
>   Platform:
> osname=linux, osvers=2.4.17-0.13smp, archname=i386-linux
> uname='linux daffy.perf.redhat.com 2.4.17-0.13smp #1 smp fri feb 1 10:30:48 est 
>2002 i686 unknown '
> config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -Dcf_by=Red 
>Hat, Inc. -Dcccdlflags=-fPIC
> -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Uusethreads -Uuseithreads 
>-Uuselargefiles -Dd_dosuid
> -Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm 
>-Dlocincpth='
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
> useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
> use64bitint=undef use64bitall=undef uselongdouble=undef
>   Compiler:
> cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include',
> optimize='-O2 -march=i386 -mcpu=i686',
> cppflags='-fno-strict-aliasing -I/usr/local/include'
> ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.1 2.96-98)', 
>gccosandvers=''
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
> alignbytes=4, usemymalloc=n, prototype=define
>   Linker and Libraries:
> ld='gcc', ldflags =' -L/usr/local/lib'
> libpth=/usr/local/lib /lib /usr/lib
> libs=-lnsl -ldl -lm -lc -lcrypt -lutil
> perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
> libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
>   Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
> cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
>   Compile-time options:
>   Built under linux
>   Compiled at Feb 20 2002 15:01:16
>   @INC:
> /usr/lib/perl5/5.6.1/i386-linux
> /usr/lib/perl5/5.6.1
> /usr/lib/perl5/site_perl/5.6.1/i386-linux
> /usr/lib/perl5/site_perl/5.6.1
> /usr/lib/perl5/site_perl
>
> perl Makefile.PL APACHE_SRC=../apache+mod_perl/src DO_HTTPD=1 USE_APACI=1 
>PREP_HTTPD=1 EVERYTHING=1 PERL_TRACE=1
>
> # make test
> ...
>
> /usr/bin/perl t/TEST 0
> modules/actions.ok
> modules/cgi.ok
> modules/constants...ok
> modules/cookie..skipped test on this platform
> modules/embperl.skipped test on this platform
> modules/eperl...skipped test on this platform
> modules/fileok
> modules/httpdconf...ok
> modules/include.ok
> modules/log.ok
> modules/module..skipped test on this platform
> modules/perlrun.ok
> modules/perlrunxs...skipped test on this platform
> modules/psections...skipped test on this platform
> modules/request.skipped test on this platform
> modules/sandwichskipped test on this platform
> modules/src.ok
> modules/ssi.ok
> modules/stage...skipped test on this platform
> modules/status..ok
> modules/symbol..skipped test on this platform
> modules/uri.ok
> modules/utilok
> internal/apiFAILED test 18
> Failed 1/87 tests, 98.85% okay
> internal/auth...ok
> internal/croak..ok
> internal/dirmagic...ok
> internal/error..ok
> internal/headersok
> internal/hooks..ok
> internal/http-get...ok
> internal/http-post..ok
> internal/proxy..ok
> internal/redirect...ok
> internal/rwrite.ok
> internal/stackedok
> internal/table..ok
> internal/taint..ok
> Failed TestStatus Wstat Total Fail  Failed  List of Failed
> 
> internal/api.t871   1.15%  18
> 10 tests skipped.
> httpd terminated
> Failed 1/38 test scripts, 97.37% okay. 1/393 subtests failed, 99.75% okay.
> make: *** [run_tests] Error 29
>
> more t/logs//error_log
> [notice] Destruction->DESTROY called for $global_object
> Pro

mod_perl-1.99_01 make test fails

2002-04-08 Thread Jie Gao

Hi Doug,

Apache 2.0.35 + modperl_20020409042640
uname -a:
Linux xxx.xxx.xx.xx 2.4.18-01-shuckle #4 Fri Apr 5 12:42:54 EST 2002 i686 unknown

perl -V
  Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=linux, osvers=2.4.17-0.13smp, archname=i386-linux
uname='linux daffy.perf.redhat.com 2.4.17-0.13smp #1 smp fri feb 1 10:30:48 est 
2002 i686 unknown '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -Dcf_by=Red Hat, 
Inc. -Dcccdlflags=-fPIC
-Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Uusethreads -Uuseithreads 
-Uuselargefiles -Dd_dosuid
-Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm 
-Dlocincpth='
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include',
optimize='-O2 -march=i386 -mcpu=i686',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.1 2.96-98)', 
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options:
  Built under linux
  Compiled at Feb 20 2002 15:01:16
  @INC:
/usr/lib/perl5/5.6.1/i386-linux
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i386-linux
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl

perl Makefile.PL APACHE_SRC=../apache+mod_perl/src DO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 
EVERYTHING=1 PERL_TRACE=1

# make test
...

/usr/bin/perl t/TEST 0
modules/actions.ok
modules/cgi.ok
modules/constants...ok
modules/cookie..skipped test on this platform
modules/embperl.skipped test on this platform
modules/eperl...skipped test on this platform
modules/fileok
modules/httpdconf...ok
modules/include.ok
modules/log.ok
modules/module..skipped test on this platform
modules/perlrun.ok
modules/perlrunxs...skipped test on this platform
modules/psections...skipped test on this platform
modules/request.skipped test on this platform
modules/sandwichskipped test on this platform
modules/src.ok
modules/ssi.ok
modules/stage...skipped test on this platform
modules/status..ok
modules/symbol..skipped test on this platform
modules/uri.ok
modules/utilok
internal/apiFAILED test 18
Failed 1/87 tests, 98.85% okay
internal/auth...ok
internal/croak..ok
internal/dirmagic...ok
internal/error..ok
internal/headersok
internal/hooks..ok
internal/http-get...ok
internal/http-post..ok
internal/proxy..ok
internal/redirect...ok
internal/rwrite.ok
internal/stackedok
internal/table..ok
internal/taint..ok
Failed TestStatus Wstat Total Fail  Failed  List of Failed

internal/api.t871   1.15%  18
10 tests skipped.
httpd terminated
Failed 1/38 test scripts, 97.37% okay. 1/393 subtests failed, 99.75% okay.
make: *** [run_tests] Error 29

more t/logs//error_log
[notice] Destruction->DESTROY called for $global_object
Prototype mismatch: sub Socket::INADDR_ANY vs () at 
/usr/lib/perl5/5.6.1/i386-linux/Socket.pm line 329.
Prototype mismatch: sub Socket::INADDR_BROADCAST vs () at 
/usr/lib/perl5/5.6.1/i386-linux/Socket.pm line 330.
Prototype mismatch: sub Socket::INADDR_LOOPBACK vs () at 
/usr/lib/perl5/5.6.1/i386-linux/Socket.pm line 331.
Prototype mismatch: sub Socket::INADDR_LOOPBACK vs () at 
/usr/lib/perl5/5.6.1/i386-linux/Socket.pm line 332.
[Tue Apr  9 17:16:36 2002] [warn] [notice] child_init for process 2740, report any 
problems to [no address given]

[Tue Apr  9 17:16:39 2002] [warn] [client 127.0.0.1] log __ANON__ OK
Use of uninitialized value in subroutine entry at 
/export/src/modperl/t/net/perl/api.pl line 223,  line
1.
*** The following [error] is expected, no cause for alarm ***
[Tue Apr  9 17:16:42 2002] [error] Missing right curly or square bracket at 
/export/src/modperl/t/docs/badsyntax.pl
line 9,
 at end of line
syntax error at /export/src/modperl/t/docs/

Re: install test fails

2002-04-03 Thread Jie Gao

On Tue, 2 Apr 2002, terry mcintyre wrote:

> Redhat Linux 7.2
> Apache 1.3.24
> Perl 5.6.1
> mod-perl-1.26
>
> make test fails with result:
>
> /usr/bin/perl t/TEST 0
> Can't locate object method "new" via package
> "URI::URL" (perhaps you forgot to load "URI::URL"?)
> at
> ../blib/lib/Apache/test.pm line 252.
> make: *** [run_tests] Error 255

I had the same problem today. What I did was to edit the test scripts
concerned (blib/lib/Apache/test.pm, etc) to add "use URI::URL;".

There is also a libwww module problem, with "$line" being undefined
in a "chunk" section, which I got around by adding "if ($line)...".

I am not sure what really caused the problem, but I also heard there
was a problem with the current version of Apache handling "chunks".

You might also have the problem of not being able to kill the test
httpd process.

Anyway, I managed to make "make test" successful and installed the
package. There was no real problem actually using the package for
me so far.

Regards,



Jie




make test fails on redhat

2002-04-02 Thread Jie Gao

Hi All,

mod_perl-1.26

uname -a
Linux  2.4.18-shuckle #2 Wed Mar 13 22:16:15 EST 2002 i686 unknown

perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=linux, osvers=2.4.17-0.13smp, archname=i386-linux
uname='linux daffy.perf.redhat.com 2.4.17-0.13smp #1 smp fri feb 1 10:30:48 est 
2002 i686 unknown '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -Dcf_by=Red Hat, 
Inc. -Dcccdlflags=-fPIC
-Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Uusethreads -Uuseithreads 
-Uuselargefiles -Dd_dosuid
-Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm 
-Dlocincpth='
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include',
optimize='-O2 -march=i386 -mcpu=i686',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.1 2.96-98)', 
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options:
  Built under linux
  Compiled at Feb 20 2002 15:01:16
  @INC:
/usr/lib/perl5/5.6.1/i386-linux
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i386-linux
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl

#make test

make[1]: Entering directory `/export/src/mod_perl-1.26/Apache'
make[1]: Leaving directory `/export/src/mod_perl-1.26/Apache'
make[1]: Entering directory `/export/src/mod_perl-1.26/Connection'
make[1]: Leaving directory `/export/src/mod_perl-1.26/Connection'
make[1]: Entering directory `/export/src/mod_perl-1.26/Constants'
make[1]: Leaving directory `/export/src/mod_perl-1.26/Constants'
make[1]: Entering directory `/export/src/mod_perl-1.26/File'
make[1]: Leaving directory `/export/src/mod_perl-1.26/File'
make[1]: Entering directory `/export/src/mod_perl-1.26/Leak'
make[1]: Leaving directory `/export/src/mod_perl-1.26/Leak'
make[1]: Entering directory `/export/src/mod_perl-1.26/Log'
make[1]: Leaving directory `/export/src/mod_perl-1.26/Log'
make[1]: Entering directory `/export/src/mod_perl-1.26/ModuleConfig'
make[1]: Leaving directory `/export/src/mod_perl-1.26/ModuleConfig'
make[1]: Entering directory `/export/src/mod_perl-1.26/PerlRunXS'
make[1]: Leaving directory `/export/src/mod_perl-1.26/PerlRunXS'
make[1]: Entering directory `/export/src/mod_perl-1.26/Server'
make[1]: Leaving directory `/export/src/mod_perl-1.26/Server'
make[1]: Entering directory `/export/src/mod_perl-1.26/Symbol'
make[1]: Leaving directory `/export/src/mod_perl-1.26/Symbol'
make[1]: Entering directory `/export/src/mod_perl-1.26/Table'
make[1]: Leaving directory `/export/src/mod_perl-1.26/Table'
make[1]: Entering directory `/export/src/mod_perl-1.26/URI'
make[1]: Leaving directory `/export/src/mod_perl-1.26/URI'
make[1]: Entering directory `/export/src/mod_perl-1.26/Util'
make[1]: Leaving directory `/export/src/mod_perl-1.26/Util'
cp t/conf/mod_perl_srm.conf t/conf/srm.conf
../apache+mod_perl/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/bin/perl t/TEST 0
modules/actions.ok
modules/cgi.ok
modules/constants...ok
modules/cookie..skipped test on this platform
modules/fileok
modules/httpdconf...ok
modules/include.ok
modules/log.ok
modules/module..skipped test on this platform
modules/perlrun.ok
modules/psections...skipped test on this platform
modules/request.skipped test on this platform
modules/src.ok
modules/ssi.ok
modules/stage...skipped test on this platform
modules/status..ok
modules/symbol..skipped test on this platform
modules/uri.ok
modules/utilok
internal/apiok
internal/auth...ok
internal/croak..ok
internal/dirmagic...ok
internal/error..ok
internal/headersok
internal/hooks..ok
internal/http-get...Use of uninitialized value in substitution (s///) at
/usr/lib/perl5/site_perl/5.6.1/Net/HTTP/Methods.pm line 425.

Re: Apache::Sandwich, etc

2001-11-12 Thread Jie Gao

On Mon, 12 Nov 2001, Mark Maunder wrote:

> Jie Gao wrote:
>
> > Hi All,
> >
> > I am wondering if it is possible to add a footer to dynamic pages,
> > server-wide, like the subject module does to static pages.
> >
> > One apparent way to me is to add another content handler, but
> > I am not sure how that'll work.
> >
> > Any suggestion is appreciated.
> >
> > Jie
>
> When you say 'dynamic pages' what do you mean? Are you using standard
> CGI scripts under Apache::Registry? Or have you written your app as
> handlers?
>
> If you've written your app as a handler, then If you're going to use
> Multiple handlers that each contribute content to the final document
> (i.e. first hander processes the request and the second adds header and
> footer info), you should check out Apache::Filter.

On 12 Nov 2001, Vivek Khera wrote:

> Date: 12 Nov 2001 12:26:41 -0500
> From: Vivek Khera <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Newsgroups: ml.apache.modperl
> Subject: Re: Apache::Sandwich, etc
>
> >>>>> "JG" == Jie Gao <[EMAIL PROTECTED]> writes:
>
> JG> I am wondering if it is possible to add a footer to dynamic pages,
> JG> server-wide, like the subject module does to static pages.
>
> Apache::Sandwich will work with whatever content handler you want,
> including dynamic ones.  See the docs.

What I am trying to do is to add a footer to the _html_ output by perl
scripts running under perl_run. After delving into the camel book, I found
I could try "stacked handler pipelining". I need to find out first what
content type the script output is, and if it is html, the footer will
be added. I'll give the idea a go now.

Thanks for the replies.

Regards,



Jie




Apache::Sandwich, etc

2001-11-11 Thread Jie Gao

Hi All,

I am wondering if it is possible to add a footer to dynamic pages,
server-wide, like the subject module does to static pages.

One apparent way to me is to add another content handler, but
I am not sure how that'll work.

Any suggestion is appreciated.





Jie




[OT] Re: mod_perl, pipes, and "No child processes"

2001-11-06 Thread Jie Gao

On Tue, 6 Nov 2001, Tom Servo wrote:

> On Tue, 6 Nov 2001, Luciano Miguel Ferreira Rocha wrote:
>
> > >
> > > I was under the assumption that doing something similar to:
> > >
> > > my $returnval = $msg->send();
> > >
> > > Would give a similar answer.
> > >
> > > I'll give the $? a shot though.   I've noticed that from the shell, it
> > > always has a 0, and that would show up as false under perl...
> >
> > Well, on the shell and every other program, an exit status of 0 means
> > success, and a higher one means an error of some kind.
> >
> > Btw: /bin/false ; echo $? ==> 1
> >  /bin/true  ; echo $? ==> 0
> >
> > Also, the SIGCHLD is sent when a child exits, no matter if in error.
> > You should then check the $? for the reason of the exit and for the
> > return code, if exited normally.
> >
> > Regards,
> >   Luciano Rocha
> >
>
> I've done this now and am getting back a -1 in $?, despite the mail itself
> succeeding.   How can I check the reason for an error code on $? ?

Check the Camel book p134 "Global Special Variables" (2nd ed).

Regards,



Jie




Re: mod_perl, pipes, and "No child processes"

2001-11-06 Thread Jie Gao

On Tue, 6 Nov 2001, Tom Servo wrote:

> Hello all.   I'm writing an app that opens a pipe to sendmail, which if
> memory serves, forks off a child process of apache to do the pipe, then
> exits as soon as it's finished.
>
> I was doing this with MIME::Lite, and it's been working absolutely
> splendidly on Linux and on Solaris 7.   However, on Solaris 8 (and I don't
> know if this is related to the OS or not) it gives me all sorts of
> problems.   Namely, this started after checking the return code on a
> MIME::Lite object called $msg after calling the send method.   It usually
> returns a 1 on success, but on the new box it was returning 0, despite the
> fact that the e-mails were actually going out.
>
> I ended up writing a test on that just opens a filehandle to |
> /usr/lib/sendmail -t -ei -eom, then printing to the filehandle, and
> closing the filehandle.   If memory serves, it's almost impossible to get
> something accurate out of this statement in mod_perl:
>
> open(SENDMAIL, "| /usr/lib/sendmail -t -ei -eom") or do_something();
> As that just reports on whether or not an apache child process was able to
> spawn, not whether it was actually able to open the pipe to sendmail.
>
> So, that runs fine, then the print works as I actually get the e-mails
> it's trying to send, but this bit of code:
>
> close(SENDMAIL) or print STDERR "Filehandle close failed: $!";
>
> spits out: "Filehandle close failed: No child processes"
>
> Any ideas what is causing this?   Like I said, the mail goes out fine, but
> it makes it pretty difficult to check the return code since it's always
> coming back false.

Shouldn't you check $? instead?



Jie




Re: Can't load mod_perl in Solaris 8

2001-07-12 Thread Jie Gao

On Thu, 12 Jul 2001, Doug MacEachern wrote:

> pitty perl -V does not report usebincompat5005, if you are trying to build
> modperl as a dso, Makefile.PL should have warned you:
>
> Your current configuration will most likely trigger core dumps,
> suggestions:
>*) Do not configure mod_perl as a DSO
>*) Upgrade your Perl version to 5.6.0 or higher (w/ -Ubincompat5005)
>*) Configure Perl with -Uusemymalloc (not recommended for performance)

This is different from what I have been hearing for the past few years:

Solaris' malloc is better than perl's.

??



Jie




Re: section woe

2001-02-17 Thread Jie Gao

On Sat, 17 Feb 2001, Erdmut Pfeifer wrote:

> On Sat, Feb 17, 2001 at 08:56:40PM +1100, Jie Gao wrote:
> > 
> > %LocationMatch = (
> >   '^/(myscript|cgi-bin)/' => {
> > 'AuthName'  => 'Elephant',
> > 'AuthType'  => 'Animals',
> > 'AuthDBMUserFile'   => '/mydir/userdbm',
> > 'AuthDBMGroupFile'  => '/mydir/groupdbm',
> > 'PerlAuthenHandler' => 'Animals::ElephantCookieHandler->authen',
> > 'PerlSetVar'=> (
> >  [ 'VirtualServerName' => qw(www.myhouse.org) ],
> >  [ 'AuthCookieDebug'   => 7 ],
> >),
> 
> syntactically, you need an array reference here, so try using:
> 
>   'PerlSetVar'=> [
>[ 'VirtualServerName' => qw(www.myhouse.org) ],
>[ 'AuthCookieDebug'   => 7 ],
>  ],
 
You are right. I totally missed that. Thanks a lot!

But I still don't know what to do with the following:


require group group1 group2


require group group1


Anybody has any idea?




Jie




section woe

2001-02-17 Thread Jie Gao

Hi All,

P. 417 of Eagle book has this:

Directive is repeated mutiple times
  
If a directive is repeated multiple times with different arguments each 
time, you can represent it as an array of arrays. This example using 
the AddIcon directive shows how:

@AddIcon = (
  [ '/icons/compressed.gif' => qw(.Z .z .gz .tgz .zip) ],
  [ '/icons/layout.gif' => qw(.html .shtml .htm .pdf) ],
)

I am testing the limit directives in my  section:

%LocationMatch = (
  '^/(myscript|cgi-bin)/' => {
'AuthName'  => 'Elephant',
'AuthType'  => 'Animals',
'AuthDBMUserFile'   => '/mydir/userdbm',
'AuthDBMGroupFile'  => '/mydir/groupdbm',
'PerlAuthenHandler' => 'Animals::ElephantCookieHandler->authen',
'PerlSetVar'=> (
 [ 'VirtualServerName' => qw(www.myhouse.org) ],
 [ 'AuthCookieDebug'   => 7 ],
   ),
'SetHandler'=> 'perl-script',
'Options'   => '+ExecCGI -Indexes',
'PerlSetupEnv'  => 'On',
'require'   => 'valid-user',
'AllowOverride' => 'None',
  },
)

Apache complains about this:

handle_command (PerlSetVar "VirtualServerName" "www.myhouse.org"): perl_cmd_var: 
'VirtualServerName'
= 'learnonline.usyd.edu.au'
OK
ARRAY(0x2fc014) Options (Invalid command 'ARRAY(0x2fc014)', perhaps mis-spelled or 
defined by a module not
included in the server configuration) Limit=no
[Sat Feb 17 20:51:28 2001] [error] (22)Invalid argument: : Invalid command 
'ARRAY(0x2fc014)', perhaps
mis-spelled or defined by a module not included in the server configuration
valid-user AllowOverride (Invalid command 'valid-user', perhaps mis-spelled or defined 
by a module not
included in the server configuration) Limit=no
[Sat Feb 17 20:51:28 2001] [error] (22)Invalid argument: : Invalid command 
'valid-user', perhaps
mis-spelled or defined by a module not included in the server configuration
On require (Invalid command 'On', perhaps mis-spelled or defined by a module not 
included in the server
configuration) Limit=no
[Sat Feb 17 20:51:28 2001] [error] (22)Invalid argument: : Invalid command 'On', 
perhaps mis-spelled
or defined by a module not included in the server configuration


Taking out "[ 'AuthCookieDebug'   => 7 ]," makes the error go away, but it's not a 
solution.

What's worse: how do you define multiple Limit sections like the following?


require group group1 group2


require group group1


I'm using A1.3.17 mp 1.2.5.

I am at a loss. 8={



Jie




DECLINED: What's going on?

2001-02-16 Thread Jie Gao

Hi All,

On p. 68 of the eagle book, the explanation of DECLINED says:

The handler has decided it doesn't want to handle the request.
Apache will act as if the subroutine were never called and either
handle the phase internally or pass the request on to another
module that has expressed its interest. Even if all registered
modules return DECLINED for a particular phase, it will still be
handled by the Apache core, which has default handlers for each
phase (even if they do nothing).

I have an authz handler at the very beginning of which I set 

return DECLINED;

but Apache doesn't seem to kick in its default handler (there is
an .htaccess file in the directory concerned).

Can anybody shed light on this?

Thanks,



Jie 




location and directory directives

2001-02-14 Thread Jie Gao

Hi All,

I have been trying to go through the document directories, find out all
the .htaccess files (which have their own authen/author
configurations), parse and merge the authorisation info with the
mod_perl authentication/authorisation directives in the server config
file via the  section.

The easiest way seemed to me was to use the  in the
server conf (with AllowOverride None), but it seems Apache did not
start the authentication process at all unless I used a  or
.

Any one have any idea on this?

I'm using mod_perl 1.25 and A1.3.17.

Thanks,



Jie




Re: PerlRun problem: undefined variables (Was: can't find method "uri")

2001-02-09 Thread Jie Gao

On Thu, 11 Jan 2001, Doug MacEachern wrote:

> On Thu, 4 Jan 2001, Jie Gao wrote:
>  
> > Another problem with PerlRun is that it seems to interfere with mod_perl
> > handlers.
> > 
> > I have an authentication/authorisation handler, which reads in from a
> > file for someinformation. After a script under PerlRun is run, the handler
> > fails to read anything from that file anymore.
> 
> i can't see what's happening from this, too much missing.  can you provide
> a small, but complete drop-in test case?

Sorry for this late reply, Doug. Here are some details.

This is from my authentication handler, which gets the location of a
file from a PerlSetVar directive, and then opens the file and reads
username and password into the variables to be used for database
connection:

---
my ($dsf, $db_f_name, $db_user_name, $db_user_pwd, $ds_name, $AuthenQueryValue);
# Get the db data source file.
$dsf = $r->dir_config( 'DSF' );
if (!defined $dsf || $dsf eq '') {
$r->log_error("DSF not defined.") if ($debug > 3);
return SERVER_ERROR;
}

# Get the db server login info.
if (defined $dsf) {
open(DBCONF, "$dsf") || $r->log_error("Can't open DSF file $dsf:$!");
while(){
next if /^#/;
next unless /^$ds_name:/;
chomp;
($ds_name, $db_f_name, $db_user_name, $db_user_pwd) = split(':', $_);
$r->log_error("In loop: ds_name=\"$ds_name\", db_f_name=\"$db_f_name\", 
db_user_name=\"$db_user_name\
", db_user_pwd=\"$db_user_pwd\"\n") if ($debug > 3);
last;
}
close DBCONF;
} else {
$r->log_reason("DB source file not defined.") if ($debug > 3);
return SERVER_ERROR;
}

unless (defined $db_f_name && defined $db_user_name && defined $db_user_pwd) {
$r->log_reason("DB source file error: definition incomplete: 
db_f_name=\"$db_f_name\"; db_user_name=\"$db
_user_name\"; db_user_pwd=\"$db_user_pwd\".") if ($debug > 3);
return SERVER_ERROR;
}
---

Now from time to time these variables become undefined, as shown in the error_log:

[Sat Feb 10 12:30:13 2001] [error] access to / failed for 129.xx.xx.xx, reason: DB 
source file error: definition
incomplete: db_f_name=""; db_user_name=""; db_user_pwd="".

This happens with 1.25 as well.

Hardcoding the variables prevents this from happening.

Regards,



Jie




Re: PerlRun problem: can't find method "uri"

2001-01-03 Thread Jie Gao

On Tue, 2 Jan 2001, Ken Williams wrote:

> >Error:
> >
> >[Tue Jan  2 16:02:37 2001] [error] Can't locate object method "uri" via
> >package "Apache::PerlRun" at
> >/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 212.
> 
> Jie,
> 
> Try this patch.  Does it solve the problem?
> 
> 
> --- PerlRun.pm  Mon Oct  2 01:02:05 2000
> +++ PerlRun-new.pm  Tue Jan  2 00:59:15 2001
> @@ -209,7 +209,7 @@
>  my $pr = shift;
>  if ($@ and substr($@,0,4) ne " at ") {
> $pr->{r}->log_error("PerlRun: `$@'");
> -   $@{$pr->uri} = $@;
> +   $@{$pr->{r}->uri} = $@;
> $@ = ''; #XXX fix me, if we don't do this Apache::exit() breaks
> return SERVER_ERROR;
>  }
> 
> 
> 
> I don't quite understand the voodoo of this line and what it's supposed
> to do, so I'm not sure about the validity of this patch.  But I think it
> might solve the problem if anything does.

Thanks for the patch. I put that in and I haven't seen the error again
yet.

Another problem with PerlRun is that it seems to interfere with mod_perl
handlers.

I have an authentication/authorisation handler, which reads in from a
file for someinformation. After a script under PerlRun is run, the handler
fails to read anything from that file anymore.

I have the following in the handler:

# Get the db server login info.
if (defined $dsf) {
open(DBCONF, "$dsf") || $r->log_error("Can't open DSF file $dsf:$!");
while(){
next if /^#/;
next unless /^$ds_name:/;
print STDERR;
chomp;
($ds_name, $db_f_name, $db_user_name, $db_user_pwd) = split(':', $_);
last;
}
close DBCONF;
} else {
$r->log_reason("DB source file not defined.") if ($debug > 3);
return SERVER_ERROR;
}

unless (defined $db_f_name && defined $db_user_name && defined $db_user_pwd) {
$r->log_reason("DB source file error: definition incomplete: 
db_f_name=\"$db_f_name\"; db_user_name=\"$db_user_name\"; 
db_user_pwd=\"$db_user_pwd\".") if ($debug > 3);
return SERVER_ERROR;
}

After the PerlRun script is run, i.e, the sencond time I run the
PerlRun script, all these variables I get from the file become
undefined, and I get the server error.

This won't happen if I turn PerlRun off.

Any solution to this?

Thanks,




Jie




PerlRun problem: can't find method "uri"

2001-01-01 Thread Jie Gao

Hi All,

> perl -V 
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=solaris, osvers=2.7, archname=sun4-solaris
uname='sunos groucho 5.7 generic_106541-12 sun4u sparc sunw,ultra-80 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='gcc -B/usr/ccs/bin/', optimize='-O2', gccversion=2.95.2 19991024 (release)
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Built under solaris
  Compiled at Jan  2 2001 10:03:49
  @INC:
/usr/local/lib/perl5/5.00503/sun4-solaris
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005

Using mod_perl-1.24_01.

Error:

[Tue Jan  2 16:02:37 2001] [error] Can't locate object method "uri" via package 
"Apache::PerlRun" at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 212.

Any idea?

Thanks,



Jie




Re: is morning bug still relevant?

2000-12-14 Thread Jie Gao

On Thu, 14 Dec 2000, Tim Bunce wrote:

> On Thu, Dec 14, 2000 at 11:47:58AM +1100, Jie Gao wrote:
> > On Thu, 14 Dec 2000, Stas Bekman wrote:
> > 
> > > I think that this item from the guide is not relevant anymore. Can I
> > > kill it? 
> > > 
> > > =head3 The Morning Bug
> > > 
> > > Relational database server keeps a connection to the client open for a
> > > limited period of time. Many developers were bitten by so called
> > > B, when every morning the first users to use the site
> > > received a C message, but after that everything
> > > worked fine. The error is caused by C returning a handle
> > > of the invalid connection (the server closed it because of a timeout),
> > > and the script was dying on that error. The infamous C method
> 
> Why is/was ping() infamous?
> 
> > > was introduced to solve this problem, but still people were being
> > > bitten by this problem. Another solution was found - to increase the
> > > timeout parameter when starting the SQL server. Currently I startup
> > > C server with a script C, so I have modified it to
> > > use this option:
> > > 
> > >   nohup $ledir/mysqld [snipped other options] -O wait_timeout=172800
> > > 
> > > (172800 seconds is equal to 48 hours. This change solves the problem.)
> > > 
> > > Note that as from version C<0.82>, C implements ping()
> > > inside the C block.  This means that if the handle has timed out
> > > it should be reconnected automatically, and avoid the morning bug.
> > 
> > Problem is it is not only relevant, but ping doesn't work in all cases.
> > I have to cron-kill/start my servers in the morning.
> 
> With what database driver?
> 
> Some drivers don't support ping others might be buggy. It's not helpful
> to say "ping doesn't work in all cases" without qualifiying why and/or
> which drivers that applies to.

OK, fair enough. It's DBD::Sybase. I have posted the problem to dbi-users
and nobody had a solution to it.

Regards,


Jie




Re: is morning bug still relevant?

2000-12-13 Thread Jie Gao

On Thu, 14 Dec 2000, Stas Bekman wrote:

> I think that this item from the guide is not relevant anymore. Can I
> kill it? 
> 
> =head3 The Morning Bug
> 
> Relational database server keeps a connection to the client open for a
> limited period of time. Many developers were bitten by so called
> B, when every morning the first users to use the site
> received a C message, but after that everything
> worked fine. The error is caused by C returning a handle
> of the invalid connection (the server closed it because of a timeout),
> and the script was dying on that error. The infamous C method
> was introduced to solve this problem, but still people were being
> bitten by this problem. Another solution was found - to increase the
> timeout parameter when starting the SQL server. Currently I startup
> C server with a script C, so I have modified it to
> use this option:
> 
>   nohup $ledir/mysqld [snipped other options] -O wait_timeout=172800
> 
> 
> (172800 seconds is equal to 48 hours. This change solves the problem.)
> 
> Note that as from version C<0.82>, C implements ping()
> inside the C block.  This means that if the handle has timed out
> it should be reconnected automatically, and avoid the morning bug.

Problem is it is not only relevant, but ping doesn't work in all cases.
I have to cron-kill/start my servers in the morning.

Cheers,


Jie




development time: Mod_perl vs mod_php

2000-12-12 Thread Jie Gao

On Tue, 12 Dec 2000 [EMAIL PROTECTED] wrote:

> What I really like to see compared is the development time of php vs perl code for a 
>given
> problem.  I've read ad nauseam about perl development time being shorter than C.
> How does php compare to perl in this regard, I wonder.

I don't know about that but the fact that php is hard to debug is
really off-putting to a mod_perl programmer. Guess which takes
more time.


Jie




Available for hire

2000-09-07 Thread Jie Gao

Hi All,

I'm available for hire in the areas of Apache+mod-perl and UNIX
Admin (Solaris, Tru64, Linux).


Jie




Re: Persistent db connectivity

2000-08-15 Thread Jie Gao

On Tue, 15 Aug 2000, Pramod Sokke wrote:

> I mentioned that I'm using Apache::Sybase::CTlib and not Apache::DBI for
> persistent connectivity. Moreover, if the module is not declared and I try
> to connect in the startup file, the server won't even start. So that's
> obviously taken care of.
> My question is more of, how do I know for sure that my server is using the
> already opened connection and is not trying to make fresh connections on
> every call to 'Connect'? The error logs say : [notice] Establishing
> connection to PURCHASEDB:purchasedb.
 
I don't think Apache::DBI works with Apache::Sybase::CTlib. You need a 
separate module for that:

Apache-Sybase-CTlib

I vaguely remember I had some problem with the ping method of
Apache-Sybase-CTlib, though. I hope I am wrong.


Jie

> -Pramod
> 
> At 11:47 PM 8/15/00 +, parthasarathy mahendirababu wrote:
> >Hi Pramod,
> >
> >Did u declare, PerlModule as Apache::DBI in the httpd.conf file or 
> >startup.pl in the conf subdirectory on Apache?  This must be declared before 
> >any other Apache modules declared on the configuration file.
> >
> >Mahen.
> >
> >
> >>Hi,
> >>
> >>I'm using Apache::Sybase::CTlib to establish persistent db connectivity in
> >>an effort to move our quite old and extremely dirty scripts from Netscape
> >>onto Apache with mod_perl. I'm establishing this connection on server
> >>startup and I haven't changed anything in my scripts. The above-mentioned
> >>module is supposed to take care of it with no changes.
> >>However, in my error logs, whenever a connection is made to the db, I see
> >>the message : [notice] Establishing connection to :, where
> >>'server' is our db server and 'db' is the database name.
> >>Does this mean that fresh connections are being established on every call
> >>to 'Connect' in my scripts inspite of establishing a connection at server
> >>startup? Does this mean that Apache is not overriding the 'connect' calls
> >>from my scripts?
> >>
> >>Thanks,
> >>Pramod
> 
> 





Re: Problem with form data using mod_perl and CGI.pm

2000-08-13 Thread Jie Gao

On Sat, 12 Aug 2000, stevenl wrote:

> I am running Linux 2.2, Apache 1.3.12, mod_perl 1.24, and CGI.pm 2.70.
> 
> If I declare a CGI variable using 'my' (see below) and use mod_perl, I
> encounter problems with POST data.  On subsequent entries in the form,
> it continues to use the old data.
> 
> The problem does not appear if I don't use 'my' (and therefore, unable
> to 'use strict'), or if I disable mod_perl from my httpd.conf file.
> 
> You can test this out with these files.  First, run 'httpd -X'.  Then
> enter some data in the form.  On the next submit, the data is not
> changed.
> 
> Note: The perl script displays the current HTML file plus what you
> just entered.
> ...
 
http://perl.apache.org/guide/perl.html#my_Scoped_Variable_in_Nested_S



Jie




Re: DBD::Sybase problem

2000-06-20 Thread Jie Gao

Hi All,

Following up the attached message I posted a couple of weeks ago, I
found if the database was taken down during the lifetime of the Web
server, this problem would pop up, even if the db was taken up again.

Cheers,


Jie

On Fri, 9 Jun 2000, Jie Gao wrote:

> Date: Fri, 9 Jun 2000 18:26:46 +1000 (EST)
> From: Jie Gao <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: DBD::Sybase problem
> 
> Hi All,
> 
> DBD::Sybase v 1.22
> DBI 1.13
> Apache::DBI v 1.44
> mod_perl/1.23 
> Apache/1.3.12 
> Solaris/Sparc 7
> 
> Using cached connnection with:
> 
> Apache::DBI->connect_on_init("DBI:Sybase:$db_name", $db_user_name, $db_user_pwd);
> 
> in start_up.pl.
> 
> Server starts ok and all goes well; but after a few hours I get server
> errors, with the following in the error_log:
> 
> [Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': 
>DBD::Sybase::db ping failed:
> OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)
> [Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': 
>Message String:
> ct_cancel(CONN,ALL): user api layer: external error: There is a usage error.  This 
>routine has been called
> at an illegal time.
> [Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': 
>OpenClient message: LAYER =
> (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)
> [Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': 
>Message String:
> ct_close(FORCE): user api layer: external error: There is a usage error.  This 
>routine has been called at an
> illegal time.
> [Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': 
>DBD::Sybase::st execute
> failed: OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)
> [Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': 
>Message String: ct_command():
> user api layer: external error: There is a usage error.  This routine has been 
>called at an illegal time.
> [Fri Jun  9 08:36:44 2000] [error] Database select error: OpenClient message: LAYER 
>= (1) ORIGIN = (1)
> SEVERITY = (1) NUMBER = (60)
> Message String: ct_command(): user api layer: external error: There is a usage 
>error.  This routine has been
> called at an illegal time.
> 
> 
> Any idea why this is happening?
> 
> Thanks very much,
> 
> 
> Jie
> 
> 





start up message

2000-06-15 Thread Jie Gao

Hi All,

-- config info ---
Apache/1.3.12 (Unix) mod_perl/1.24
$  perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=solaris, osvers=2.7, archname=sun4-solaris
uname='sunos duo 5.7 generic_106541-11 sun4u sparc sunw,ultra-60 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='gcc -B/usr/ccs/bin/', optimize='-O3', gccversion=2.95.2 19991024 (release)
cppflags='-I/usr/local/include -I/opt/local/include'
ccflags ='-I/usr/local/include -I/opt/local/include'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib -L/opt/local/lib'
libpth=/usr/local/lib /opt/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib'


Characteristics of this binary (from libperl): 
  Built under solaris
  Compiled at Jun 14 2000 20:30:20
  @INC:
/usr/local/lib/perl5/5.00503/sun4-solaris
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005
-


I am getting the following message at start-up:

$ ../bin/apachectl configtest
Subroutine handler redefined at 
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/Registry.pm line 27.
Subroutine compile redefined at 
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/Registry.pm line 173.
Subroutine parse_cmdline redefined at 
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/Registry.pm line 189.
Subroutine DESTROY redefined at 
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/Registry.pm line 213.
Syntax OK

The same config worked fine with Apache 1.3.6/mod_perl/1.21.

Thanks,



Jie




One cgi test fails w/ "CGI open of tmpfile: Permission denied"

2000-06-14 Thread Jie Gao

Hi All,

I have had the subject problem just now. And there is no specific
answer about a solution in the archive. The one that got me
out of this problem is:

chmod 1777 /var/tmp



Jie

--
make test output:

 $ TEST -v modules/cgi.t
 modules/cgi.module CGI is installed
 1..5
 ok 1
 ok 2
 ok 3
 ServerError:
 CGI open of tmpfile: Permission denied






DBD::Sybase problem

2000-06-09 Thread Jie Gao

Hi All,

DBD::Sybase v 1.22
DBI 1.13
Apache::DBI v 1.44
mod_perl/1.23 
Apache/1.3.12 
Solaris/Sparc 7

Using cached connnection with:

Apache::DBI->connect_on_init("DBI:Sybase:$db_name", $db_user_name, $db_user_pwd);

in start_up.pl.

Server starts ok and all goes well; but after a few hours I get server
errors, with the following in the error_log:

[Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': 
DBD::Sybase::db ping failed:
OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)
[Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': Message 
String:
ct_cancel(CONN,ALL): user api layer: external error: There is a usage error.  This 
routine has been called
at an illegal time.
[Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': 
OpenClient message: LAYER =
(1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)
[Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': Message 
String:
ct_close(FORCE): user api layer: external error: There is a usage error.  This routine 
has been called at an
illegal time.
[Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': 
DBD::Sybase::st execute
failed: OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)
[Fri Jun  9 08:36:44 2000] PerlHandler subroutine `Apache::Registry::handler': Message 
String: ct_command():
user api layer: external error: There is a usage error.  This routine has been called 
at an illegal time.
[Fri Jun  9 08:36:44 2000] [error] Database select error: OpenClient message: LAYER = 
(1) ORIGIN = (1)
SEVERITY = (1) NUMBER = (60)
Message String: ct_command(): user api layer: external error: There is a usage error.  
This routine has been
called at an illegal time.


Any idea why this is happening?

Thanks very much,


Jie




Re: Memory usage for libareq uploads

2000-06-05 Thread Jie Gao

On Tue, 6 Jun 2000, Jeremy Howard wrote:
>...
> 
> Well, I'm facing this problem now. The parms() method (or parse() or
> anything else that calls parms()) chews up enormous amounts of memory
> when uploading large files. I like to give my webmail users freedom to
> upload pretty much whatever size attachments they like, but that means my
> Apache processes grow very large, and never shrink again.
> 
> What can I do to avoid this? I know I can use one of the various
> directives that kills off large processes, but that seems a bit
> aggressive... Has anyone got any sample code that spins off file upload
> activity to an external CGI and then returns to a mod_perl handler when
> the dirty work is done? ...Or is there some new code out there (or coming
> Real Soon Now) that avoids this whole issue?

What I do is kill the child process after uploading is finished:

$r->child_terminate();

Not an elegant way, but it works for the time being.


Jie




Registry scripts slower than handlers: Why?

2000-02-03 Thread Jie Gao

On Thu, 3 Feb 2000, Joshua Chamas wrote:

> I regrouped the HelloWorld benchmark data at http://www.chamas.com/bench/ 
> recently, so that it gives you a more informative comparison of the relative
> startup costs of web environments on a per platform basis.

Registry scripts run slower according to the benchmark data here. Presuming
both were preloaded at server startup, can anybody explain this slowness?

Thanks,



Jie





Re: As long as we're at it...

2000-02-01 Thread Jie Gao

On Tue, 1 Feb 2000, Steve Reppucci wrote:

> As long as we're on the job thread:

Will you guys indicate in your ads whether you take app. from OUTSIDE
USA, please?  Who knows if you can't get someone like Doug who's
a Kiwi? :-)


Jie



Re: Perlhandler -> AUTH: Solved

1999-10-21 Thread Jie Gao

On Thu, 21 Oct 1999, Darko Krizic wrote:

> I just hacked a little PerlHandler (content handler) module that uses Basic auth. I 
>found out that things like 
> 
> $r->note_basic_auth_failure;
> my($res, $sent_pw) = $r->get_basic_auth_pw;
> return AUTH_REQUIRED
> 
> do not work correctly for a content handler. Therefore I wrote this code:
> 
> 
> #!/usr/bin/perl -w
> 
> package My;
> 
> use strict;
> use Apache ();
> use Apache::Log;
> use Apache::Constants (qw/:common/);
> use MIME::Base64;   # needed for decode of basic auth
> 
> sub handler
> {
> my $r = shift;
> my $user;
> my $password;
> my $userpass = $r->header_in("Authorization") || undef;
> Apache->request($r);
> my $log = $r->log();
> 
> # optionally decode authorization
> if( $userpass ) {   # got any authorization
> if( $userpass =~ m/^Basic / ) {
> # only basic
> $userpass =~ s/^Basic //;   # remove leading
> ($user,$password)   # decode user + pass
> = split(":", decode_base64 $userpass);
> $log->warn("user=$user, password=$password");
> }
> }
> 
> unless( defined $user
> and $user eq "DeKay" and 
> defined $password
> and $password eq "got it" 
> ) {
> # no auth or auth not valid
> $r->header_out("WWW-Authenticate" => "Basic realm=\"Test\"");
> $r->content_type("text/html");
> $r->status(AUTH_REQUIRED);
> $r->send_http_header;
> $r->print("Auth required");
> return OK;
> }
> 
> # auth valid
> $r->content_type("text/html");
> $r->send_http_header;
> $r->print("user: $user");
> $r->print("Password: $password");
> return OK;
> }
> 
> 1;
> 
> Questions:
> 
> - This does not look very mod_perlish, can this be done "better"?
> - How can I make Apache print its "Authentication required" message itself? In this 
>module I have to do this by myself.

Get the Eagle book (see www.modperl.com) and you'll get what you want.


Jie