Re: CGI.pm and friends port to mp2

2003-03-13 Thread Brian P Millett
Lincoln Stein wrote:

Hi Stas,

Thanks.  I'll fold these changes and release on CPAN.  I'll also remove the 
$|=1 setting, since that was globally needed for FastCGI compatibility, and I 
don't think that anyone uses it anymore.

Lincoln
 

They have came out with a fastcgi (mod_fastcgi-2.4.0) release for 
httpd-2.0, so you might want to think about that.

--
Brian Millett
Enterprise Consulting Group   "Shifts in paradigms
(314) 205-9030   often cause nose bleeds."
[EMAIL PROTECTED]   Greg Glenn




Re: mod_perl 2.0 question about $r->connection->auth_type

2003-02-13 Thread Brian P Millett
Stas Bekman wrote:


Brian Millett wrote:


Hi,
  I've just about got the Apache::AuthCookieDBI to work with Apache
2.0.44 & mod_perl 1.99_09-dev, but I ran into a problem with the
$r->connection object not having "auth_type" or "user" defined.  The
$r->auth_type work just fine.  Are these the same reference?  What
should I look for, or use?



They don't live in the connection record in 2.0, only in the request 
record. I've added Apache::compat methods for backwards compatibility. 
Notice that you need to set up:

   PerlOptions +GlobalRequest

for that location.

Either use the latest modperl-2.0 cvs or apply this patch to get the 
functionality:
http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=104509336821414&w=2

Thanks Stas.  However the latest cvs co (as 10 minutes ago) returns this 
error testing:

compat/conn_authen.NOK 1# Failed test 1 in 
compat/conn_authen.t at line 11
compat/conn_authen.FAILED test 
1
   Failed 1/1 tests, 0.00% okay

From the error_log:
[Thu Feb 13 09:10:04 2003] [error] [client 127.0.0.1] Can't locate 
object method "auth_type" via package "Apache::Connection" at 
/home/bpm/compile_area/cvs_apache/modperl-2.0/t/response/TestCompat/conn_authen.pm 
line 25.


This is against http-2.0.44 on a solaris 9 box with gcc version 3.1.



--
Brian Millett
Enterprise Consulting Group   "Shifts in paradigms
(314) 205-9030   often cause nose bleeds."
[EMAIL PROTECTED]   Greg Glenn




Re: Can't build mod_ssl + mod_perl

2001-09-17 Thread Brian P Millett

Peter Lister wrote:

> apache_1.3.20 mod_perl-1.26 mod_ssl-2.8.4-1.3.20
>
> I can't build Apache with these together if the mod_ssl build works,
> mod_perl is not built in. If I build mod_perl in the approved manner,
> the mod_ssl build files.
>
> I have followed the recipe in INSTALL.SSL - and it doesn't help. Has
> anyone got a recipe for doing this?

Here is a script that I use for making apache+modperl+ssl as a dso:
(Make sure to change any path references to your needs)
--BEGIN--
#!/bin/sh
#

SRC_DIR=$*
##
if [ "$SRC_DIR" = "." ]; then
SRC_DIR=$PWD
fi
PATH=/usr/bin:/usr/sbin:/opt/sfw/bin:/usr/ccs/bin

PREFIX=/opt/apache
MODPERL_DIR=$SRC_DIR/modperl
APACHE_DIR=$SRC_DIR/apache
MODSSL_DIR=$SRC_DIR/modssl
SSL_BASE=/opt/sfw
EAPI_MM=$SRC_DIR/mm

export SSL_BASE RSA_BASE EAPI_MM PATH

# This can be GNU or Apache
LAYOUT=Apache
MAKE=`which gmake`

##
##  important hint for the first-time users
##
if [ $# -eq 0 ]; then
echo " + Warning: Configuring Apache without a src dir."
echo " + This is probably not what you really want."
echo " + Please supply as argument the directory where the src are found."
echo
exit 0
else  if [ $# -gt 1 ]; then
echo " + Warning: Configuring Apache with multiple src dirs.."
echo " + This is probably not what you really want."
echo " + Please supply as argument the directory where the src are found."
echo
exit 0
 fi
fi

### IMPORTANT ###
#
# If you already have a certificate, then fill in their locations:
#
CERT=/path/to/your/server.crt
#CERT=/opt/raven/module/pki/certs/signedCert.cert
#KEY=/opt/raven/module/pki/keys/internal.ec-group.com.key

 NOTHING MORE TO CONFIGURE ##

# FOR FIRST CLEAN SOURCES DO:
echo "Going to $EAPI_MM"
cd $EAPI_MM

CFLAGS=$CFLAGS \
./configure --disable-shared

if [ $? -ne 0 ]; then
echo "Configure MM failure!!!"
exit 1
fi

$MAKE

if [ $? -ne 0 ]; then
echo "Unable to make MM!!"
exit 1
fi

# FOR FIRST CLEAN SOURCES DO:
echo "Going to $APACHE_DIR"
cd $APACHE_DIR

CFLAGS=$CFLAGS \
./configure --prefix=$PREFIX \
--with-layout=$LAYOUT

if [ $? -ne 0 ]; then
echo "Configure Apache failure!!!"
exit 1
fi

# FOR MOD_SSL FIRST DO:

echo "Going to $MODSSL_DIR"
cd $MODSSL_DIR

if [ "$CERT" = "/path/to/your/server.crt" ]; then
echo "Configuring without certificates"
CFLAGS=$CFLAGS \
./configure --prefix=$PREFIX \
--with-apache=$APACHE_DIR
else
echo "Configuring with certificates"
CFLAGS=$CFLAGS \
./configure --prefix=$PREFIX \
--with-apache=$APACHE_DIR \
--with-crt=$CERT \
--with-key=$KEY
fi

if [ $? -ne 0 ]; then
echo "Failure to configure mod_ssl!!!"
exit 1
fi

# FOR MOD_PERL FIRST DO:

echo "Going to $MODPERL_DIR"
cd $MODPERL_DIR

perl Makefile.PL \
APACHE_SRC=$APACHE_DIR/src \
DO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
USE_DSO=1 \
EVERYTHING=1

if [ $? -ne 0 ]; then
echo "Configure Mod Perl failure!!!"
 exit 1
fi

echo "Making modperl"
$MAKE && $MAKE install

echo "Going back to $APACHE_DIR"
cd $APACHE_DIR

CFLAGS=$CFLAGS \
./configure --prefix=$PREFIX \
--with-layout=$LAYOUT \
--activate-module=src/modules/perl/libperl.a \
--enable-shared=ssl \
--enable-shared=perl \
--enable-module=most \
--enable-module=auth_dbm

if [ $? -ne 0 ]; then
echo "Unable to configure Apache/ModPerl/SSL!!"
exit 1
fi
echo "Making the final Apache/ModPerl/SSL"
$MAKE

if [ $? -ne 0 ]; then
echo "Unable to make Apache/ModPerl/SSL!!"
exit 1
fi

## Ok, if there are no certificates, then make a certificate

if [ "$CERT" = "/path/to/your/server.crt" ]; then
echo "Making test certificate"
make certificate TYPE=test
fi

 INSTALL FINALLY!!!

$MAKE install
--END--

--
Brian Millett
Enterprise Consulting Group   "Shifts in paradigms
(314) 205-9030   often cause nose bleeds."
[EMAIL PROTECTED]   Greg Glenn






Re: [Fwd: [apache-users] Core with x86 solaris & modperl]

2000-05-12 Thread Brian P Millett

Doug MacEachern wrote:

> i'm going to release 1.24 asap to stop this madness.  looks like another
> case of the 5.6.0 largefile support bug, which the patch below will fix.
> for apxs, you'll need to build apache like so:
> CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
> ./configure \
> ...
>
> --- Makefile.PL 2000/04/21 19:37:45 1.159
> +++ Makefile.PL 2000/04/27 22:45:30 1.160
> @@ -186,7 +186,7 @@
>  $PERL_DEBUG = "";
>  $PERL_DESTRUCT_LEVEL = "";
>  $PERL_STATIC_EXTS = "";
> -$PERL_EXTRA_CFLAGS = "";
> +$PERL_EXTRA_CFLAGS = $] >= 5.006 ? $Config{ccflags} : "";
>  $SSLCacheServerPort = 8539;
>  $SSL_BASE = "";
>  $Port = $ENV{HTTP_PORT} || 8529;

Did this.  Recompiled Apache, modperl, jserv.  Same results. :-(

Modperl & Apache without Raven does work.  But Raven, Modperl, Apache =
core.

--
Brian Millett
Enterprise Consulting Group "Shifts in paradigms
(314) 205-9030 often cause nose bleeds."
[EMAIL PROTECTED]   Greg Glenn






[Fwd: [apache-users] Core with x86 solaris & modperl]

2000-05-12 Thread Brian P Millett





I've installed the raven 1.4.2 with Apache 1.3.11 for solaris 8  on a
x86 platform.  It works just fine.

When I add Apache JServ 1.1, it still works OK.

When I add modperl 1.23, it cores.

Apache 1.3.11 & modperl 1.23 works just grand.

Modperl & raven = core.

Here are the particulars & a core dump:

shaka: gcc -v
Reading specs from /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)

shaka: uname -a
SunOS shaka 5.8 Generic i86pc i386 i86pc

shaka: perl -v

This is perl, v5.6.0 built for i86pc-solaris

Copyright 1987-2000, Larry Wall

Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5.0 source
kit.

Complete documentation for Perl, including FAQ lists, should be found on

this system using `man perl' or `perldoc perl'.  If you have access to
the
Internet, point your browser at http://www.perl.com/, the Perl Home
Page.

mod_perl_1.23,raven_ssl-1.4.2-1.3.11-x86-solaris-2.x, apache-1.3.11,
JServ 1.1

Script used to make & install code:
--BEGIN--
#!/bin/sh
#

JAVAHOME=/usr/java
JSDK=/opt/java/JSDK2.0/lib/jsdk.jar
PREFIX=/opt/apache
SRC_DIR=/home/bpm/compile_area
MODPERL_DIR=$SRC_DIR/modperl
APACHE_DIR=$SRC_DIR/apache
JSERV_DIR=$SRC_DIR/jserv
LAYOUT=Apache
MAKE=`which make`

 NOTHING MORE TO CONFIGURE ##

# FOR FIRST CLEAN SOURCES DO:
echo "Going to $APACHE_DIR"
cd $APACHE_DIR

./configure --prefix=$PREFIX \
--with-layout=$LAYOUT

if [ $? -ne 0 ]; then
echo "Configure Apache failure!!!"
exit 1
fi

# FOR MOD_PERL FIRST DO:

echo "Going to $MODPERL_DIR"
cd $MODPERL_DIR

perl Makefile.PL \
APACHE_SRC=$APACHE_DIR/src \
DO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1

if [ $? -ne 0 ]; then
echo "Configure Mod Perl failure!!!"
 exit 1
fi

echo "Making modperl"
$MAKE && $MAKE install

#THEN GO TO JSERV AND DO:

echo "Going to $JSERV_DIR"
cd $JSERV_DIR

./configure --prefix=$PREFIX/jserv \
--enable-apache-conf \
--with-apache-src=$APACHE_DIR \
--with-jdk-home=$JAVAHOME \
--with-JSDK=$JSDK \
--disable-debugging

if [ $? -ne 0 ]; then
echo "Failure to configure JServ"
exit 1
fi
echo "Making JServ java src & installing"
$MAKE

if [ $? -ne 0 ]; then
echo "Falure to make ApacheJServ!!"
exit 1
fi

$MAKE install
#THEN GO BACK TO APACHEXXX AND DO:

echo "Going back to $APACHE_DIR"
cd $APACHE_DIR

./configure --prefix=$PREFIX \
--with-layout=$LAYOUT \
--activate-module=src/modules/perl/libperl.a \
--activate-module=src/modules/jserv/libjserv.a \
--activate-module=src/modules/raven_ssl/libraven_ssl.a \
--enable-module=most \
--enable-module=auth_dbm

if [ $? -ne 0 ]; then
echo "Unable to configure Apache/ModPerl/JServ/RavenSSL!!"
exit 1
fi
echo "Making the final Apache/ModPerl/JServ/RavenSSL"
$MAKE

if [ $? -ne 0 ]; then
echo "Unable to make Apache/JServ/SSL!!"
exit 1
fi

 INSTALL FINALLY!!!

$MAKE install
--END--

shaka: /opt/apache/bin/httpd -X -DSSL
Segmentation Fault (core dumped)

shaka: gdb /opt/apache/bin/httpd core
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-pc-solaris2.8"...
(no debugging symbols found)...
Core was generated by `/opt/apache/bin/httpd -X'.
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /usr/lib/libsocket.so.1...(no debugging symbols
found)...
done.
Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols
found)...
done.
Reading symbols from
/opt/perl/lib/5.6.0/i86pc-solaris/CORE/libperl.so...
(no debugging symbols found)...done.
Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libm.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libc.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libcrypt_i.so.1...(no debugging symbols
found)...
done.
Reading symbols from /usr/lib/libsec.so.1...(no debugging symbols
found)...
done.
---Type  to continue, or q  to quit---
Reading symbols from /usr/lib/libmp.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libgen.so.1...(no debugging symbols
found)...
done.
Reading symbols from /usr/lib/nss_files.so.1...(no debugging symbols
found)...
done.
#0  0x817039c in ap_ctx_set ()
(gdb) bt
#0  0x817039c in ap_ctx_set ()
#1  0x8086f02 in ssl_hook_ReadReq ()
#2  0x814d797 in ap_create_per_dir_config ()
#3  0x814d8ee in ap_run_post_read_re