apache question...

2001-02-28 Thread Joseph Crotty

I am set up on apache_1.3.14/mod_perl currently, however, have an older
non-mod_perl apache_1.3.6.  The old apache's index.html needs to redirect to
the index.html on the new apache/mod_perl.  The old and new apache servers
are on different unix boxes.  Anyone think of an elegant block directive
solution, because I can't.

Thanks,

Joe Crotty



bug repository???

2001-02-14 Thread Joseph Crotty

Is there any sort of mod_perl bug repository??

Joe Crotty



PREFIX behavior question...

2001-02-14 Thread Joseph Crotty

hey all,

I built apache/mod_perl using the PREFIX argument, but am puzzled by the
results.  I assumed that the Perl modules would be installed into the
location specified by PREFIX(according to Stas's guide), which is the case
if the location is absolute, but not if it is relative(Stas's guide uses an
example with an absolute location-
http://perl.apache.org/guide/install.html#Installation_Without_Superuser_P
).  

Consider the following:

JCROTTY:mailroom:/tmpls -al
drwxr-xr-x   8 jcrotty  dvlp 907 Feb 14 20:12 apache_1.3.14/
-rw-r--r--   1 jcrotty  other1824568 Feb 13 18:14 apache_1.3.14.tar.gz
drwxr-xr-x  24 jcrotty  dvlp2190 Feb 14 20:09 mod_perl-1.25/
-rw-r--r--   1 jcrotty  other 366834 Feb 13 18:14 mod_perl-1.25.tar.gz

JCROTTY:mailroom:/tmp/mod_perl-1.25perl Makefile.PL PREFIX=../joe

make
make test
make install
All of the above go smoothly.


JCROTTY:mailroom:/tmp/joe/lib/site_perl/5.6.0/sun4-solarisls
./ ../auto/

That's it, no modules are present in
/tmp/joe/lib/site_perl/5.6.0/sun4-solaris or any of the other
/tmp/joe/lib... locations.

If I build with perl Makefile.PL PREFIX=/tmp/joe then make, make test and
make install we get:

JCROTTY:mailroom:/tmp/joe/lib/site_perl/5.6.0/sun4-solarisls -al
drwxr-xr-x   5 jcrotty  dvlp 683 Feb 14 20:24 ./
drwxr-xr-x   3 jcrotty  dvlp 114 Feb 14 20:12 ../
drwxr-xr-x   3 jcrotty  dvlp1630 Feb 14 20:24 Apache/
-r--r--r--   1 jcrotty  dvlp   34914 Jan 29 10:33 Apache.pm
drwxr-xr-x   2 jcrotty  dvlp 111 Feb 14 20:24 Bundle/
drwxr-xr-x   4 jcrotty  dvlp 149 Feb 14 20:24 auto/
-r--r--r--   1 jcrotty  dvlp3277 Mar  3  2000 cgi_to_mod_perl.pod
-r--r--r--   1 jcrotty  dvlp1096 Jan 29 21:08 mod_perl.pm
-r--r--r--   1 jcrotty  dvlp   27538 Nov 28 10:45 mod_perl.pod
-r--r--r--   1 jcrotty  dvlp2706 Feb 29  2000 mod_perl_cvs.pod
-r--r--r--   1 jcrotty  dvlp 512 Feb 14 20:19 mod_perl_hooks.pm
-r--r--r--   1 jcrotty  dvlp  43 Jul 18  1998 mod_perl_hooks.pm.PL
-r--r--r--   1 jcrotty  dvlp4781 Mar  3  2000
mod_perl_method_handlers.pod
-r--r--r--   1 jcrotty  dvlp   11781 Mar  3  2000 mod_perl_traps.pod
-r--r--r--   1 jcrotty  dvlp   17520 Mar  3  2000 mod_perl_tuning.pod

Am I out to lunch or is there a good reason for this behavior?

Joe Crotty







RE: compiling mod_perl without root...

2001-02-13 Thread Joseph Crotty

Ged,

Thanks for the reply.  The heart of the problem is we need to compile
apache/mod_perl from source(i.e. apache_1.3.14.tar.gz and
mod_perl1-1.25.tar.gz) which lives in cvs.  The machine cvs resides on is
not the target machine for the apache/mod_perl install.  The plan is to
compile it and install it in a directory in cvs current, and then package
the whole thing up using the SUN package utilities.

To complicate matters we need to build apache/mod_perl from the cvs source
under a group other than root.  So I run as someone other then root, the
compile goes fine, but when make install comes I get the following:

Warning: You do not have permissions to install into
/usr/local/lib/perl5/site_perl/5.6.0 at
/usr/local/lib/perl5/5.6.0/ExtUtils/Install.pm line 62.
Cannot forceunlink /usr/local/man/man3/Apache.3: Permission denied at
/usr/local/lib/perl5/5.6.0/File/Find.pm line 475
make: Fatal error: Command failed for target `pure_site_install'

I assume its upset because /usr/local/lib/perl5/site_perl/5.6.0 is 
drwxr-xr-x  30 root other   2560 Nov 29 11:28 5.6.0

I don't know where to get a binary distribution of apache_x.x.x/mod_perl-x.x
so it looks like I am stuck if I want to compile with other than rootor
else edit the makefile.PL which sounds dreadful.

-Original Message-
From: G.W. Haywood [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 2:21 PM
To: Joseph Crotty
Cc: [EMAIL PROTECTED]
Subject: Re: compiling mod_perl without root...


Hi there,

On Tue, 13 Feb 2001, Joseph Crotty wrote:

 How do I compile so the apache perl modules get
 installed in a place of my choosing???

You can just copy them there yourself.  Then all you have to do is set
the @INC paths so they can be found at runtime.  I think you'll find
all you need about that in the Guide.  http://perl.apache.org/guide

But you still need to be root to attach to port 80, so root has to
start the server unless it's only going to listen to ports  1024.

73,
Ged.



server_root question...

2001-02-05 Thread Joseph Crotty

Hey all,

Maybe its too early or whatever.  How would you go about setting
$ENV{SERVER_ROOT} without using Perl.  I was trying

PerlSetEnv SERVER_ROOT Apache::server_root_relative()

in perl.conf, but no go.  Any ideas?

Joe Crotty



RE: server_root question...

2001-02-05 Thread Joseph Crotty

Interesting, I tried the following in perl.conf:

PerlRequire conf/startup.pl
PerlFreshRestartOn
PerlSetEnv  MOD_PERL_TRACE all

#Directory Handlers
#--
Directory /perl
AllowOverride   None
Options +ExecCGI
SetHandler  perl-script
PerlHandler Apache::Registry
PerlSendHeader  On
/Directory

Directory ~ "^/(cgi-bin|htdocs|perl)$"
PerlAccessHandler   Apache::GateKeeper
ErrorDocument 403   /index.html

Files ~ "/(index\.html|login\.cgi)$"
PerlAccessHandler   Apache::OK
/Files
/Directory

Perl
$ENV{'SERVER_ROOT'} = Apache::server_root_relative();
/Perl


but, the Perl Block Directive issues this error on restart:


 Syntax error on line 26 of /home/dvlp/jcrotty/apache/conf/perl.conf:
Usage: Apache::server_root_relative(rsv, name="") at
/home/dvlp/jcrotty/apache/conf/perl.conf line 25.

./apachectl restart: httpd could not be started

perl -cx reports syntax is OK

Any ideas would be greatly appreciated.

-Original Message-
From: Stathy Touloumis [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 05, 2001 10:51 AM
To: Joseph Crotty; [EMAIL PROTECTED]
Subject: RE: server_root question...


If you want to use a perl function ( Apache::server_root_relative() ) then
you have to use a Perl block.

This might work :

PerlSetEnv SERVER_ROOT \
Perl
Apache::server_root_relative()
/Perl

But this seems so much easier :

Perl
$ENV{'SERVER_ROOT'} = Apache::server_root_relative()
/Perl

 Maybe its too early or whatever.  How would you go about setting
 $ENV{SERVER_ROOT} without using Perl.  I was trying

 PerlSetEnv SERVER_ROOT Apache::server_root_relative()

 in perl.conf, but no go.  Any ideas?



ServerRoot/Block Directive question...

2001-02-02 Thread Joseph Crotty

Hi all,

I have an Apache::GateKeeper that checks to see if the user has logged in
and been served a cookie... if not they are redirected to index.html(to
login).  I want all comers to ServerRoot/cgi-bin or ServerRoot/perl to have
to go thru the GateKeeper handler, except those trying to get to login.cgi
which lives in ServerRoot/perl.  I was trying to use the perl.conf Block
Directives below, but am not getting the negated Files !~ line to work
right.  I snooped around on the mail archives but can't find anything about
negated regex matching.

PerlRequire conf/startup.pl
PerlFreshRestartOn
PerlSetEnv  MOD_PERL_TRACE all

#Directory Handlers
#--
Directory /perl
AllowOverride   None
Options +ExecCGI
SetHandler  perl-script
PerlHandler Apache::Registry
PerlSendHeader  On
/Directory

Directory ~ (cgi-bin|perl)
Files !~ "login.cgi"
PerlAccessHandler   Apache::GateKeeper
ErrorDocument   403 /index.html
/Files
/Directory

Thanks,

Joe Crotty



Apache::Registry and variables...

2001-01-24 Thread Joseph Crotty

All,

I read that if you run scripts under Apache::Registry, its a good idea to
write memory leak proof code.  I also read that one should "clean up their"
globals.  Any examples in Stas's guide or elsewhere of "cleaning up" globals
or classic memory leaks associated with Apache::Registry.

Thanks,

Joe Crotty



RE: PerlAccessHandler Question...

2001-01-09 Thread Joseph Crotty

Good advice Ged.  I figured out the problem...there was another server
running on the port almost exactly like the one I was using, but without the
PerlAccessHandler.  Huge brain fart.  I need a nap.


-Original Message-
From: G.W. Haywood [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 09, 2001 11:44 AM
To: Joseph Crotty
Cc: '[EMAIL PROTECTED]'
Subject: Re: PerlAccessHandler Question...


Hi there,

On Tue, 9 Jan 2001, Joseph Crotty wrote:

  open(FILE, "/tmp/dog");

Always check the status returned by a call like open().

73,
Ged.



compiling mod_perl-1.24

2000-11-28 Thread Joseph Crotty

I am on a sun box:

uname -a

SunOS mailroom 5.6 Generic_105181-22 sun4u sparc SUNW,Ultra-5_10

I built and tested both perl 5.6.0 and apache_1.3.9 against gcc and they
check out OK:

gcc -v

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.7.2.2/specs
gcc version 2.7.2.2

perl -V

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
osname=solaris, osvers=2.6, archname=sun4-solaris
uname='sunos mailroom 5.6 generic_105181-22 sun4u sparc sunw,ultra-5_10
'
config_args='-Dcc=gcc'
hint=previous, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define 
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
cc='gcc', optimize='-O', gccversion=2.7.2.2
cppflags='-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64'
ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -lgdbm -ldl -lm -lc -lcrypt -lsec
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): 
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Nov 27 2000 16:41:31
  @INC:
/usr/local/lib/perl5/5.6.0/sun4-solaris
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl

So, I run the Makefile as follows:

perl Makefile.PL EVERYTHING=1 APACHE_PREFIX=/usr/local/apache

Configure mod_perl with ../apache_1.3.9/src ? [y] 
Shall I build httpd in ../apache_1.3.9/src for you? [y] 
Appending mod_perl to src/Configuration
Using config file: /home/dvlp/jcrotty/mod_perl-1.24/src/Configuration
Creating Makefile
 + configured for Solaris 260 platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
 + checking sizeof various data types
 + doing sanity check on compiler and options
Creating Makefile in support
Creating Makefile in os/unix
Creating Makefile in ap
Creating Makefile in main
Creating Makefile in lib/expat-lite
Creating Makefile in modules/standard
EXTRA_CFLAGS: -DSOLARIS2=260 -DUSE_EXPAT -I$(SRCDIR)/lib/expat-lite
PerlDispatchHandler.enabled
PerlChildInitHandlerenabled
PerlChildExitHandlerenabled
PerlPostReadRequestHandler..enabled
PerlTransHandlerenabled
PerlHeaderParserHandler.enabled
PerlAccessHandler...enabled
PerlAuthenHandler...enabled
PerlAuthzHandlerenabled
PerlTypeHandler.enabled
PerlFixupHandlerenabled
PerlHandler.enabled
PerlLogHandler..enabled
PerlInitHandler.enabled
PerlCleanupHandler..enabled
PerlRestartHandler..enabled
PerlStackedHandlers.enabled
PerlMethodHandlers..enabled
PerlDirectiveHandlers...enabled
PerlTableApienabled
PerlLogApi..enabled
PerlUriApi..enabled
PerlUtilApi.enabled
PerlFileApi.enabled
PerlConnectionApi...enabled
PerlServerApi...enabled
PerlSectionsenabled
PerlSSI.enabled
Will run tests as User: 'nobody' Group: 'other'
Checking CGI.pm VERSION..ok
Checking for LWP::UserAgent..ok
Checking for HTML::HeadParserok
Writing Makefile for Apache
Writing Makefile for Apache::Connection
Writing Makefile for Apache::Constants
Writing Makefile for Apache::File
Writing Makefile for Apache::Leak
Writing Makefile for Apache::Log
Writing Makefile for Apache::ModuleConfig
Writing Makefile for Apache::PerlRunXS
Writing Makefile for Apache::Server
Writing Makefile for Apache::Symbol
Writing Makefile for Apache::Table
Writing Makefile for Apache::URI
Writing Makefile for Apache::Util
Writing Makefile for mod_perl

I run make and get this:

gcc -c  -I../os/unix -I../include   -DSOLARIS2=260 -DUSE_EXPAT
-I../lib/expat-lite -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.6.0/sun4-solaris/CORE  -I.
-I../.. -DUSE_PERL_SSI -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DMOD_PERL http_config.c
In file included from /usr/include/sys/vnode.h:41,
 from