Re: [ANNOUNCE] Apache2-AuthenNTLM-0.01

2005-04-27 Thread Shannon Eric Peevey

This is a true Apache2 module now and has been updated for the changes 
in mp2-rc5.  It will not work with any version of mod_perl before 
mp2-rc5, so anyone that is using a version of mp2-rc5, should continue 
to use Apache-AuthenNTLM-2.11.
Ummm...  That should have been, "anyone that is using a version of 
mod_perl prior to mp2-rc5 should continue to use Apache-AuthenNTLM-2.11"

Sorry :P
--
Shannon Eric Peevey
President - EriKin Corporation
[EMAIL PROTECTED]
(940) 391-6777
http://www.erikin.com


[ANNOUNCE] Apache2-AuthenNTLM-0.01

2005-04-27 Thread Shannon Eric Peevey
The uploaded file
   Apache2-AuthenNTLM-0.01.tar.gz
has entered CPAN as
 file: $CPAN/authors/id/S/SP/SPEEVES/Apache2-AuthenNTLM-0.01.tar.gz
 size: 62723 bytes
  md5: a0e12bf715c52683490b782e2ad6b46d
No action is required on your part
Request entered by: SPEEVES (Shannon Eric Peevey)
Request entered on: Thu, 28 Apr 2005 01:04:11 GMT
Request completed:  Thu, 28 Apr 2005 01:05:44 GMT
This is a true Apache2 module now and has been updated for the changes in 
mp2-rc5.  It will not work with any version of mod_perl before mp2-rc5, so 
anyone that is using a version of mp2-rc5, should continue to use 
Apache-AuthenNTLM-2.11.  I will remove all shared mp1/mp2 code from the next 
release of Apache-AuthenNTLM, and it will become the mp1 branch of the 
Apache(*)-AuthenNTLM series.
Please, give Apache2-AuthenNTLM a try, and let me know if you see any issues with the code changes that I've made.  

Here are a list of changes to Apache2-AuthenNTLM-0.01:
-split from the parent Apache::AuthenNTLM
-moved to the Apache2::AuthenNTLM namespace
-all mp1/mp2 shared code has been removed
-all mp1/mp2 shared code replaced with mp2 code
-fixed all changes to work with mp2 API renaming changes
thanks,
--
Shannon Eric Peevey
President - EriKin Corporation
[EMAIL PROTECTED]
(940) 391-6777
http://www.erikin.com


Outgoing content-length apparently 0

2005-04-27 Thread Craig or Merikay MacKenna
Hope this is the address to which to send a problem/question!

Our Verio "Virtual Private Server" is FreeBSD-based with Apache 1.3.33.
I've installed mod-perl 1.29 and mod_gzip 1.3.19.2a, and revised our former
CGI scripts to run as perl modules under the Apache API.

They are operating fine, except for one residual problem.

When a script builds a response, mod_gzip squawks in the error_log like
this: 
... [error] mod_gzip: EMPTY FILE [/tmp/_16777_106_7.wrk] in sendfile2
... [error] mod_gzip: Make sure all named directories exist and have ...

The corresponding entry in access_log looks like this:
... "POST /contact HTTP/1.1" 200 0or
... "GET /x/whoami.cgi HTTP/1.1" 200 0

The zero outgoing length in the log entry agrees with mod_gzip's complaint,
but in reality the correct body is going out to the browser (I was the
browser user for both of the access_log cases above).  The former case
(contact) runs under mod_perl, while the latter runs under mod_cgi.

Today I tried an approach to solving this, wherein I build up the whole body
in a scalar $body, and then do a

send_response('text/html');

where send_response is:

sub send_response {
  $r->header_out("Content-Length", length $body);
  $r->send_http_header(shift);
  if (!$r->header_only) {$r->print($body)}
  undef $body;
}

The problem still persists.  So I searched our logs.  The first "200 0" log
entry for a script was seen before I installed mod_gzip, and after I
followed the advice of the "Practical mod-perl" book, and moved all of the
scripts from /usr/local/apache/cgi-bin to a new directory
/usr/local/apache/perl.  Before that the scripts had been running fairly
correctly under mod_perl and Apache::Registry in .../cgi-bin, without
showing any "200 0" log entries for scripts.

None of the following changes in httpd.conf seem to affect the problem:
PerlSendHeaders On/Off
PerlSetupEnv On/Off
Option +ExecCGI in the Location block of a script

Finally I tried making a  block in an attempt
to get as close to the conditions under which the last script output with a
non-zero length was seen.  No help!

Scripts that do a redirect using the same send_response routine as above,
show log entries like "302 771", although $body contained just a few bytes.

So my question is: what do I need to do, to make Apache hand off the output
from the script to mod_gzip properly, and (far less important) show the
proper length in the log?

Thanks to anyone who can help,
Craig MacKenna
Los Gatos, CA
408-353-5037




Re: [mp2] modperl2 compile error

2005-04-27 Thread Stas Bekman
Tom Caldwell wrote:
-8<-- Start Bug Report 8<--
1. Problem Description:
 Modperl2 dynamic module build fails on Red Hat Linux (Intel 64)
with the following error.
gcc -shared \ \ mod_perl.lo modperl_interp.lo modperl_tipool.lo
modperl_log.lo modperl_config.lo modperl_cmd.lo modperl_options.lo
[...]
modperl_exports.lo  -Wl,-E
/opt/perl/lib/5.8.6/x86_64-linux/auto/DynaLoader/DynaLoader.a
-L/opt/perl/lib/5.8.6/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt
-lutil -lc \ -o mod_perl.so /usr/bin/ld:
/opt/perl/lib/5.8.6/x86_64-linux/auto/DynaLoader/DynaLoader.a(DynaLoader.o):
relocation R_X86_64_32 can not be used when making a shared object;
recompile with -fPIC 
   
/opt/perl/lib/5.8.6/x86_64-linux/auto/DynaLoader/DynaLoader.a: could
not read symbols: Bad value
Tom, the answer is right there: you need to rebuild perl with -fPIC
>> *** /opt/perl/bin/perl -V
>> Dynamic Linking:
>> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
>> cccdlflags='-fpic', lddlflags='-shared'
   ^^^
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


[mp2] modperl2 compile error

2005-04-27 Thread Tom Caldwell

> -8<-- Start Bug Report 8<--
> 1. Problem Description:
>  
>   Modperl2 dynamic module build fails on Red Hat Linux (Intel 64)
> with the following error.
> 
> gcc -shared \
>  \
> mod_perl.lo modperl_interp.lo modperl_tipool.lo modperl_log.lo 
> modperl_config.lo modperl_cmd.lo modperl_options.lo modperl_callback.lo 
> modperl_handler.lo modperl_gtop.lo modperl_util.lo modperl_io.lo 
> modperl_io_apache.lo modperl_filter.lo modperl_bucket.lo modperl_mgv.lo 
> modperl_pcw.lo modperl_global.lo modperl_env.lo modperl_cgi.lo 
> modperl_perl.lo modperl_perl_global.lo modperl_perl_pp.lo modperl_sys.lo 
> modperl_module.lo modperl_svptr_table.lo modperl_const.lo 
> modperl_constants.lo modperl_apache_compat.lo modperl_error.lo 
> modperl_debug.lo modperl_common_util.lo modperl_common_log.lo 
> modperl_hooks.lo modperl_directives.lo modperl_flags.lo modperl_xsinit.lo 
> modperl_exports.lo  -Wl,-E  
> /opt/perl/lib/5.8.6/x86_64-linux/auto/DynaLoader/DynaLoader.a 
> -L/opt/perl/lib/5.8.6/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil 
> -lc \
> -o mod_perl.so
> /usr/bin/ld: 
> /opt/perl/lib/5.8.6/x86_64-linux/auto/DynaLoader/DynaLoader.a(DynaLoader.o): 
> relocation R_X86_64_32 can not be used when making a shared object; recompile 
> with -fPIC
> /opt/perl/lib/5.8.6/x86_64-linux/auto/DynaLoader/DynaLoader.a: could not read 
> symbols: Bad value
> collect2: ld returned 1 exit status
> make[1]: *** [mod_perl.so] Error 1
> make[1]: Leaving directory `/opt/modperl/mod_perl-2.0.0-RC5/src/modules/perl'
> make: *** [modperl_lib] Error 2
> 
> As I am running red hat, there is another version of Perl installed, 
> apache2 has been built with the new version in /opt/perl.
> 
> Any ideas?
> 
> Thanks,
> 
> Tom
> 
> 2. Used Components and their Configuration:
>  
> *** mod_perl version 1.999022
>  
> *** using /opt/modperl/mod_perl-2.0.0-RC5/lib/Apache2/BuildConfig.pm
>  
> *** Makefile.PL options:
>   MP_APR_LIB => aprext
>   MP_AP_PREFIX   => /opt/apache2/server
>   MP_COMPAT_1X   => 1
>   MP_GENERATE_XS => 1
>   MP_LIBNAME => mod_perl
>   MP_USE_DSO => 1
>  
> 
> *** The httpd binary was not found
> tc - found at /opt/apache2/server/bin/httpd   
> 
>  
> *** (apr|apu)-config linking info
>  
>  -L/opt/apache2/server/lib -lapr-0 -lrt -lm -lcrypt -lnsl  -lpthread -ldl
>  -L/opt/apache2/server/lib -laprutil-0 -lgdbm -ldb-4.1 -lexpat
>  
> 
> 
> *** /opt/perl/bin/perl -V
> Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
>   Platform:
> osname=linux, osvers=2.4.21-27.0.2.el, archname=x86_64-linux
> uname='linux dizzy 2.4.21-27.0.2.el #1 smp wed jan 12 23:25:36 est 2005 
> x86_64
> x86_64 x86_64 gnulinux '
> config_args='-Dprefix=/opt/perl -Dcc=gcc'
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=undef use5005threads=undef useithreads=undef 
> usemultiplicity=undef
> useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=define use64bitall=define uselongdouble=undef
> usemymalloc=n, bincompat5005=undef
>   Compiler:
> cc='gcc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include 
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
> optimize='-O2',
> cppflags='-fno-strict-aliasing -pipe -I/usr/local/include 
> -I/usr/include/gdbm'
> ccversion='', gccversion='3.2.3 20030502 (Red Hat Linux 3.2.3-49)', 
> gccosandvers=''
> intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
> ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', 
> lseeksize=8
> alignbytes=8, prototype=define
>   Linker and Libraries:
> ld='gcc', ldflags =''
> libpth=/lib /usr/lib /usr/lib64
> libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
> perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
> libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
> gnulibc_version='2.3.2'
>   Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
> cccdlflags='-fpic', lddlflags='-shared'
>   
>  
>  
> Characteristics of this binary (from libperl):
>   Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
>   Built under linux
>   Compiled at Apr 25 2005 12:34:43
>   %ENV:
> PERL_LWP_USE_HTTP_10="1"
>   @INC:
> /opt/perl/lib/5.8.6/x86_64-linux
> /opt/perl/lib/5.8.6
> /opt/perl/lib/site_perl/5.8.6/x86_64-linux
> /opt/perl/lib/site_perl/5.8.6
> /opt/perl/lib/site_perl
> /opt/apache/perl
> .
>  
> *** Packages of interest status:
>  
> Apache2 : -
> Apache2::Request: -
> CGI : 3.05
> LWP : -
> mod_perl: -
> mod_perl2   : -
>  
> 
> 3. This is the core dump trace:

Re: ModPerl2, Apache2, FreeBSD, ports and missing ModPerl::Registry

2005-04-27 Thread Stas Bekman
angie ahl wrote:
Is there any specific reason I should go up to .22 now?
Yes, you must do that. Please see: 
http://perl.apache.org/docs/2.0/rename.html

I'd like to try and stick to the ports if possible but if needs must
I'll manually compile.
Angie
On 4/27/05, Stas Bekman <[EMAIL PROTECTED]> wrote:
angie ahl wrote:
[...]
I get an ISE and the errorlog says
ModPerl::Registry': Can't locate ModPerl/Registry.pm in @INC
so it is calling ModPerl::Registry but can't find it in @INC, but to
make things stranger, I have a cgi script called perldigger that gives
you a system overview and it says ModPerl::Registry is there, as does
the list of installed perl modules under the users admin in
directadmin.
Huh?
It's definately running Apache2:
Apache/2.0.52 (Unix) mod_perl/1.99_17-dev Perl/v5.8.5 PHP/4.3.11
mod_ssl/2.0.52 OpenSSL/0.9.7d
Angie, please install mod_perl-1.999.22 (aka mp2.0-RC5) [1] and try again.
If still in trouble please submit a proper bug report as explained here:
http://perl.apache.org/bugs/. Thank you.
[1] http://perl.apache.org/download/index.html
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: ModPerl2, Apache2, FreeBSD, ports and missing ModPerl::Registry

2005-04-27 Thread Stas Bekman
angie ahl wrote:
I found the problem
It seems that it was not using the Apache2 directory of modules, it
seems that the missing mp2 modules were in there.
1 change to the httpd.conf fixed it.
at the top of my vhost I put:
PerlModule Apache2
Then it found what it needed. This wasn't in the httpd.conf example in
getting your feet wet for mp2
http://perl.apache.org/docs/2.0/user/intro/start_fast.html
Should it be there, is it required or is there something wrong with my setup?
I also had a page that had the -wT switch on the first line which gave an error:
can't locate Apache::Warn if I remember correctly. getting rid of the
switch and putting in use strict; use warnings; fixed that, but
thought I should mention it for the archive in case anyone finds this
in the future following the same set up.
The docs are correct for RC5 (they aren't for older unsupported versions). 
Install that and everything will work as documented.

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: ModPerl2, Apache2, FreeBSD, ports and missing ModPerl::Registry

2005-04-27 Thread angie ahl
Is there any specific reason I should go up to .22 now?

I'd like to try and stick to the ports if possible but if needs must
I'll manually compile.

Angie

On 4/27/05, Stas Bekman <[EMAIL PROTECTED]> wrote:
> angie ahl wrote:
> [...]
> > I get an ISE and the errorlog says
> >
> > ModPerl::Registry': Can't locate ModPerl/Registry.pm in @INC
> >
> > so it is calling ModPerl::Registry but can't find it in @INC, but to
> > make things stranger, I have a cgi script called perldigger that gives
> > you a system overview and it says ModPerl::Registry is there, as does
> > the list of installed perl modules under the users admin in
> > directadmin.
> >
> > Huh?
> >
> > It's definately running Apache2:
> >
> > Apache/2.0.52 (Unix) mod_perl/1.99_17-dev Perl/v5.8.5 PHP/4.3.11
> > mod_ssl/2.0.52 OpenSSL/0.9.7d
> 
> Angie, please install mod_perl-1.999.22 (aka mp2.0-RC5) [1] and try again.
> If still in trouble please submit a proper bug report as explained here:
> http://perl.apache.org/bugs/. Thank you.
> 
> [1] http://perl.apache.org/download/index.html
> 
> --
> __
> Stas BekmanJAm_pH --> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>


Re: ModPerl2, Apache2, FreeBSD, ports and missing ModPerl::Registry

2005-04-27 Thread angie ahl
I found the problem

It seems that it was not using the Apache2 directory of modules, it
seems that the missing mp2 modules were in there.

1 change to the httpd.conf fixed it.

at the top of my vhost I put:

PerlModule Apache2

Then it found what it needed. This wasn't in the httpd.conf example in
getting your feet wet for mp2

http://perl.apache.org/docs/2.0/user/intro/start_fast.html

Should it be there, is it required or is there something wrong with my setup?

I also had a page that had the -wT switch on the first line which gave an error:
can't locate Apache::Warn if I remember correctly. getting rid of the
switch and putting in use strict; use warnings; fixed that, but
thought I should mention it for the archive in case anyone finds this
in the future following the same set up.

Cheers

Angie

On 4/27/05, Stas Bekman <[EMAIL PROTECTED]> wrote:
> angie ahl wrote:
> [...]
> > I get an ISE and the errorlog says
> >
> > ModPerl::Registry': Can't locate ModPerl/Registry.pm in @INC
> >
> > so it is calling ModPerl::Registry but can't find it in @INC, but to
> > make things stranger, I have a cgi script called perldigger that gives
> > you a system overview and it says ModPerl::Registry is there, as does
> > the list of installed perl modules under the users admin in
> > directadmin.
> >
> > Huh?
> >
> > It's definately running Apache2:
> >
> > Apache/2.0.52 (Unix) mod_perl/1.99_17-dev Perl/v5.8.5 PHP/4.3.11
> > mod_ssl/2.0.52 OpenSSL/0.9.7d
> 
> Angie, please install mod_perl-1.999.22 (aka mp2.0-RC5) [1] and try again.
> If still in trouble please submit a proper bug report as explained here:
> http://perl.apache.org/bugs/. Thank you.
> 
> [1] http://perl.apache.org/download/index.html
> 
> --
> __
> Stas BekmanJAm_pH --> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>


Re: libapreq2 failed with last mod_perl2

2005-04-27 Thread Marc Gràcia




Oopss...
I didn't see the previous thread about this topic SORRY!!.
Everything clear now... no worries.
I stick with RC4

It's hard to break compatibility, but sometimes needed. It's for better guys!! :)
RC4 works perfect for me... no problem.


El dc 27 de 04 del 2005 a les 17:28 +0200, en/na Marc Gràcia va escriure:

Hi everybody,
Seems that mod_perl-2.0.0-RC5 break libapreq compilation...
I've already seen that last mod_perl version changes a lot of things that make it incompatible with previous versions.
(mod_perl.pm and Apache2 renamed/moved for what i see here while compiling libapreq...)
There's any way to compile it ? Or I must wait libapreq2 to compatibilize everything... 
It's Ok to stick to RC4 by the moment? Any serious bug in it?

Cheers and thanks for all in advance...




-- 
Marc Gràcia <[EMAIL PROTECTED]>








Re: DirectoryIndex ignored when using perl-handler

2005-04-27 Thread Geoffrey Young

for the sake of the archives, william reported that the below fixup handler
is "working like a champ" so I guess this is a workable solution for anyone
in the same situation.

and for anyone listening, rolling up a test tarball like william did was
outstanding - I was more than happy (ecstatic, actually) to spend the 10
minutes it took me to code the proper handler when all I needed to do was
run 'make test' and see _exactly_ what he saw as the problem and what he
expected to see when all was working properly.

so, thanks william :)

--Geoff


> the below code used as the only fixup
> handler should do the trick.
> 
> HTH
> 
> --Geoff
> 
> package My::Fixup;
> 
> use strict;
> use warnings FATAL => qw(all);
> 
> use Apache2::Const -compile => qw(DIR_MAGIC_TYPE OK DECLINED);
> use Apache2::RequestRec;
> 
> sub handler {
> 
>   my $r = shift;
> 
>   if ($r->handler eq 'perl-script' &&
>   -d $r->filename  &&
>   $r->is_initial_req)
>   {
> $r->handler(Apache2::Const::DIR_MAGIC_TYPE);
> 
> return Apache2::Const::OK;
>   }
> 
>   return Apache2::Const::DECLINED;
> }
> 
> 1;


libapreq2 failed with last mod_perl2

2005-04-27 Thread Marc Gràcia




Hi everybody,
Seems that mod_perl-2.0.0-RC5 break libapreq compilation...
I've already seen that last mod_perl version changes a lot of things that make it incompatible with previous versions.
(mod_perl.pm and Apache2 renamed/moved for what i see here while compiling libapreq...)
There's any way to compile it ? Or I must wait libapreq2 to compatibilize everything... 
It's Ok to stick to RC4 by the moment? Any serious bug in it?

Cheers and thanks for all in advance...




-- 
Marc Gràcia <[EMAIL PROTECTED]>







Re: compiling perl on freebsd to support ithreads

2005-04-27 Thread Jay Scherrer
I thought that it was a module compiled into Apache MPM. That you use
when compiling mp2. 

My bad

Jay Scherrer

On Wed, 2005-04-27 at 16:43 +0200, Tom Schindl wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Jay Scherrer schrieb:
> | According to Schwartz, when he last spoke on the subject, He recommended
> | using prefork with mp2. I guess he wasn't impressed enough with threads
> | yet.
> |
> 
> True if you can avoid it but as stated in another mail when runing on
> win32 as far as I know you can not use prefork.
> 
> [...]
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCb6UrkVPeOFLgZFIRAh06AJ4qZuJjxD1x2VI/BVlnD1Y5V65OVgCgjTAp
> W8kfEMO8bZk5hvpdUM4m6PU=
> =O5gE
> -END PGP SIGNATURE-



Re: ModPerl2, Apache2, FreeBSD, ports and missing ModPerl::Registry

2005-04-27 Thread Stas Bekman
angie ahl wrote:
[...]
I get an ISE and the errorlog says
ModPerl::Registry': Can't locate ModPerl/Registry.pm in @INC
so it is calling ModPerl::Registry but can't find it in @INC, but to
make things stranger, I have a cgi script called perldigger that gives
you a system overview and it says ModPerl::Registry is there, as does
the list of installed perl modules under the users admin in
directadmin.
Huh?
It's definately running Apache2:
Apache/2.0.52 (Unix) mod_perl/1.99_17-dev Perl/v5.8.5 PHP/4.3.11
mod_ssl/2.0.52 OpenSSL/0.9.7d
Angie, please install mod_perl-1.999.22 (aka mp2.0-RC5) [1] and try again. 
If still in trouble please submit a proper bug report as explained here:
http://perl.apache.org/bugs/. Thank you.

[1] http://perl.apache.org/download/index.html
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: compiling perl on freebsd to support ithreads

2005-04-27 Thread Stas Bekman
Tom Schindl wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Stas Bekman schrieb:
| Tom Schindl wrote:
| [...]
|
|> Perl with compiled threads support (used or not used) is much slower and
|> when new threads are started the whole memory is copied over because
|> there's no copy-on-write logic like there is for fork.
|
|
| Actually there is COW in the recent perls, but it doesn't perform very
| well.
|
|
Good to know. I'm following p5p but have only recognized the CLONE_SKIP
discussion ;-)
Just visited the p5p Olympus, and I was told that while COW exists it's 
not used by perl_clone (threads) yet. But it's planned to try and see 
whether it improves the situation some time later (probably after Nicholas 
releases 5.8.7).

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: compiling perl on freebsd to support ithreads

2005-04-27 Thread Tom Schindl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Stas Bekman schrieb:
| Tom Schindl wrote:
| [...]
|
|> Perl with compiled threads support (used or not used) is much slower and
|> when new threads are started the whole memory is copied over because
|> there's no copy-on-write logic like there is for fork.
|
|
| Actually there is COW in the recent perls, but it doesn't perform very
| well.
|
|
Good to know. I'm following p5p but have only recognized the CLONE_SKIP
discussion ;-)
Tom
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCb6Z2kVPeOFLgZFIRAkvXAKCd4AZQOTQqWdC6sbc+36+709hJQgCeJvZV
xdwPJRI3nBxVJ4GEaYEj1I4=
=QbjX
-END PGP SIGNATURE-


Re: ModPerl2, Apache2, FreeBSD, ports and missing ModPerl::Registry

2005-04-27 Thread Tom Schindl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
angie ahl schrieb:
| Hi Folks.
|
| I've just got a new server running DirectAdmin on FreeBSD 5.3. I'm
| brand new to FreeBSD apart from its similarity to OS X, which I use
| all the time.
|
| I upgraded to Perl 5.8.5 using a package:
|
| pkg_add -r perl5.8
Why does freebsd don't use the stable 5.8.6 release?
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCb6YckVPeOFLgZFIRAlJhAJ9Gwr7SaJR1/x3GUDG51lmzx6VbDgCgqILl
VAbHtXWXfnSydklaKPd0HY4=
=QYkd
-END PGP SIGNATURE-


Re: compiling perl on freebsd to support ithreads

2005-04-27 Thread Stas Bekman
Tom Schindl wrote:
[...]
Perl with compiled threads support (used or not used) is much slower and
when new threads are started the whole memory is copied over because
there's no copy-on-write logic like there is for fork.
Actually there is COW in the recent perls, but it doesn't perform very well.
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: compiling perl on freebsd to support ithreads

2005-04-27 Thread Tom Schindl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jay Scherrer schrieb:
| According to Schwartz, when he last spoke on the subject, He recommended
| using prefork with mp2. I guess he wasn't impressed enough with threads
| yet.
|
True if you can avoid it but as stated in another mail when runing on
win32 as far as I know you can not use prefork.
[...]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCb6UrkVPeOFLgZFIRAh06AJ4qZuJjxD1x2VI/BVlnD1Y5V65OVgCgjTAp
W8kfEMO8bZk5hvpdUM4m6PU=
=O5gE
-END PGP SIGNATURE-


Re: compiling perl on freebsd to support ithreads

2005-04-27 Thread Jay Scherrer
According to Schwartz, when he last spoke on the subject, He recommended
using prefork with mp2. I guess he wasn't impressed enough with threads
yet.

Jay Scherrer

On Wed, 2005-04-27 at 08:39 +0200, Tom Schindl wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Foo Ji-Haw schrieb:
> | Hello Michael,
> |
> | Are you saying that Perl with ithreads is slower, therefore
> | implementation of threading on Perl is generally avoided?
> |
> | I write apps for both Windows and UNIX platforms. I thought that
> | iThreads is the better alternative to forking, which I think is not well
> | implemented in Windows.
> |
> 
> As far as I know there's only a threaded mpm for Apache2 available on
> win32. If you have to support win32 and unix your modules must certainly
> be thread aware which means you can not use all functions
> mod_perl-provides to you. e.g. setting the document_root is one of those
> if I remember correctly. You cannot use perls "chdir", ... .
> 
> Perl with compiled threads support (used or not used) is much slower and
> when new threads are started the whole memory is copied over because
> there's no copy-on-write logic like there is for fork.
> 
> 
> Tom
> 
> | Michael Peters wrote:
> |
> |> Foo Ji-Haw wrote:
> |>
> |>
> |>> Hello Philip,
> |>>
> |>> You are suggesting that FBSD 4.x is not easy to compile ithreads via
> |>> ports. I wonder why FBSD even on 5.x does not come with ithreads
> |>> precompiled (Linux does!). But I find it quite a deterent to use FBSD
> |>> for multiple apps in the future.
> |>>
> |>
> |>
> |> One of the biggest complaints I hear (and voice) is that the linux
> |> distros ship a perl with ithreads. It's slower and almost noone wants or
> |> needs it. It looks like FBSD is doing what the majority of people want
> |> it to do, so I wouldn't knock it :)
> |>
> |>
> |>
> |
> |
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCbzONkVPeOFLgZFIRAoT7AJ9SVaXiBQvNNWwebKZHhJeblbFnVQCfQCWf
> u31I+dYacvfshbdzVwW2IQE=
> =drPU
> -END PGP SIGNATURE-



Re: Apache2::DBI?

2005-04-27 Thread Philip M. Gollucci
Octavian Rasnita wrote:
Hi,
Is there a module Apache2::DBI on CPAN?
I have searched on search.cpan.org but I couldn't find it. I just found
Apache::DBI but I guess this module will not work with mod_perl rc5.
I thought this module is not available for Windows only, but it seems that
this module is not available for anyone.
Thanks.
 

*From: *"Philip M. Gollucci" <[EMAIL PROTECTED]>
*Date: *April 19, 2005 4:36:24 AM EDT
*To: [EMAIL PROTECTED]
*Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
*Subject: [UPGRADE]: Apache::DBI 0.96 for mod_perl 2.0 RC5
*
Hi all,
Hopefully I didn't overstep any bounds here.
At http://p6m7g8.net/Apache-DBI are 3 files
http://p6m7g8.net/Apache-DBI/0.94_0.96.patch
http://p6m7g8.net/Apache-DB/I-0.96.tar.gz
http://p6m7g8.net/Apache-DBI/Apache-DBI.ppd
This gets Apache::DBI to work nicely with mod_perl2.0RC5
I was going to add some Apache-Test tests using Apache::TestMM (per 
ask's requests), but I couldn't figure out how not to kill the existing 
test suites if Apache-Test isn't installed (for mp1 users this will 
usually be the case as its not in the core mp1 core)

Also, I realize AuthDBI version jumped 2 or 3 but I didn't see a reason 
why they should be different if they are going to be distrubuted together.

HTH
All feedback appreciated.
--
END
-
Philip M. Gollucci
Senior Developer - Liquidity Services Inc.
Phone:  202.558.6268 (Direct)
E-Mail: [EMAIL PROTECTED]
Web:http://www.liquidation.com


ModPerl2, Apache2, FreeBSD, ports and missing ModPerl::Registry

2005-04-27 Thread angie ahl
Hi Folks.

I've just got a new server running DirectAdmin on FreeBSD 5.3. I'm
brand new to FreeBSD apart from its similarity to OS X, which I use
all the time.

I upgraded to Perl 5.8.5 using a package:

pkg_add -r perl5.8

Then I upgraded to Apache2 and ModPerl1.99 as per the instructions successfully.

http://www.directadmin.com/features.php?id=441

running under cgi mode everything is fine, no problems loading server etc.

when I try and run in proper mod_perl mode the problems start. ie
using the ModPerl::Registry as a handler.

As per the MP2 getting started guide I've added the following to a
sites httpd.conf file:

 Alias /perl/ /home/angie/domains/domain.dom/public_html/perl/
  
  SetHandler perl-script
  PerlResponseHandler ModPerl::Registry
  PerlOptions +ParseHeaders
  Options +ExecCGI
  


I Restarted directadmin & apache and loaded hello world script under /perl/.

I get an ISE and the errorlog says

ModPerl::Registry': Can't locate ModPerl/Registry.pm in @INC

so it is calling ModPerl::Registry but can't find it in @INC, but to
make things stranger, I have a cgi script called perldigger that gives
you a system overview and it says ModPerl::Registry is there, as does
the list of installed perl modules under the users admin in
directadmin.

Huh?

It's definately running Apache2:

Apache/2.0.52 (Unix) mod_perl/1.99_17-dev Perl/v5.8.5 PHP/4.3.11
mod_ssl/2.0.52 OpenSSL/0.9.7d

and hello world Runs fine under cgi mode.

Anyone seen this one before?... so close, so easily, rats.

TIA

Angie


Apache2::DBI?

2005-04-27 Thread Octavian Rasnita
Hi,

Is there a module Apache2::DBI on CPAN?
I have searched on search.cpan.org but I couldn't find it. I just found
Apache::DBI but I guess this module will not work with mod_perl rc5.

I thought this module is not available for Windows only, but it seems that
this module is not available for anyone.

Thanks.



Re: compiling perl on freebsd to support ithreads

2005-04-27 Thread Tom Schindl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Foo Ji-Haw schrieb:
| Hello Tom,
|
| Just to clarify: are you saying that forking is better than threading on
| windows? Even if it is, I will have to throw in IPC to talk between the
| forks?
No. What I'm trying to say:
When using Mod-Perl2 on win32 your modules have to be thread-safe
because you don't have the possibility to use prefork(like on Unix)
because it simply doesn't exists as a processing module for apache2 on
win32.
Hence on win32 you need a perl with ithreads-support. On your freebsd
you could turn of threads when running apache2 with prefork.
=> Setup on win32:
~   + perl with ithreads
~   + apache2 with win32-mpm
=> Setup on freebsd:
~ => A
~   + perl with ithreads
~   + apache2 with worker-mpm
~ => B:
~   + perl without ithreads
~   + apache2 with prefork
Tom
|
| Tom Schindl wrote:
|
| Foo Ji-Haw schrieb:
| | Hello Michael,
| |
| | Are you saying that Perl with ithreads is slower, therefore
| | implementation of threading on Perl is generally avoided?
| |
| | I write apps for both Windows and UNIX platforms. I thought that
| | iThreads is the better alternative to forking, which I think is not
| well
| | implemented in Windows.
| |
|
| As far as I know there's only a threaded mpm for Apache2 available on
| win32. If you have to support win32 and unix your modules must certainly
| be thread aware which means you can not use all functions
| mod_perl-provides to you. e.g. setting the document_root is one of those
| if I remember correctly. You cannot use perls "chdir", ... .
|
| Perl with compiled threads support (used or not used) is much slower and
| when new threads are started the whole memory is copied over because
| there's no copy-on-write logic like there is for fork.
|
|
| Tom
|
| | Michael Peters wrote:
| |
| |> Foo Ji-Haw wrote:
| |>
| |>
| |>> Hello Philip,
| |>>
| |>> You are suggesting that FBSD 4.x is not easy to compile ithreads via
| |>> ports. I wonder why FBSD even on 5.x does not come with ithreads
| |>> precompiled (Linux does!). But I find it quite a deterent to use FBSD
| |>> for multiple apps in the future.
| |>>
| |>
| |>
| |> One of the biggest complaints I hear (and voice) is that the linux
| |> distros ship a perl with ithreads. It's slower and almost noone
| wants or
| |> needs it. It looks like FBSD is doing what the majority of people want
| |> it to do, so I wouldn't knock it :)
| |>
| |>
| |>
| |
| |
|
|>
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCb2YskVPeOFLgZFIRApqGAJ0bYCf6LobOy169v11yZSOQw12kOgCghBii
cYIbwJG/g2o8ONNpanxrBBA=
=YXw/
-END PGP SIGNATURE-


Re: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

2005-04-27 Thread Sylvain CRESTO
Jean-Paul COGNET wrote:
> Hi Stas,
> Good advice !!
> I've found that a user have a similar problem using PHP, and that the only
> avalaible value for NSL_LANG is this case was
> 'American_America.EE8ISO8859P2'
> I've tried this value and it works, but with bad accents.
> "ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
> l'enlèvement ne pourra pas se faire"
> becomes
> "ou entrer l'heure d'enl?vement passée ou ? venir. Entrer étoile si
> l'enl?vement ne pourra pas se faire"
> 
> BUT with this strange value
> 'American_America.WE8ISO8859P1'
> it seems to work fine.
> "ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
> l'enlèvement ne pourra pas se faire"
> stays
> "ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
> l'enlèvement ne pourra pas se faire"
> 
> Maybe, Oracle doesn't like France ;-)

Hi,

Setting NLS_LANG to "french_france.WEISO8859P1" or "french_france.WEISO8859P15"
and LC_ALL to "french" or "C" seems to work.


Sylvain


Re: [mp1] segmentation fault in Apache->server->dir_config()

2005-04-27 Thread Mike Taylor
> Date: Tue, 26 Apr 2005 22:05:08 -0400
> From: Stas Bekman <[EMAIL PROTECTED]>
> 
> hmm, I guess there still some people using mp1. This is so
> unfashionable.  Everybody wears RC5 these days :)

:-)

I did initially try to use mod_perl2 and Apache2, but I couldn't get
the HTML::Mason module to work with them; and since Mason is my reason
for wanting to use mod_perl at all, I backed down to 1.x.

>> The bizarre thing is that, as I said, _nothing_ has changed since
>> yesterday, when this worked just fine.
> 
> Mike, have you by chance upgraded some modules between the last
> server startup and reboot? Remember that mod_perl won't see any
> changes until restarted, so if you did change things you could have
> known whether they have affected mod_perl or not.

I wish it were so!  But, no; that machine's Apache server has been
reloaded and restarted half a dozen times every day, as I've tweaked
its configuration.  I am quite certain that I didn't make an
configuration changes that didn't immediately get tested.  So, no,
nothing explicitly changed between the last restart of Apache before
the reboot, and the reboot itself.  Which makes me think it must be
something that was in the running state of the computer -- but what?
I really can't imagine.

>> I tried to run httpd under both strace and gdb, but I have not
>> managed to get any useful information out of it that way.  I am
>> using Apache 1.3.33 with mod_perl 1.29 (the most recent 1.x
>> versions of both, I believe) both built from source.
> 
> Mike, you need to get the core backtrace. Please check:
> 'Getting the Backtrace From Core Dumps' at
> http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems
> for details. Also an output of 'perl -V' would be helpful.

Backtrace to follow.  In the mean time, here is the perl -V output.
Thanks for your help.

--

$ perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
osname=linux, osvers=2.4.21-1.1931.2.382.entsmp, 
archname=i386-linux-thread-multi
uname='linux stripples.devel.redhat.com 2.4.21-1.1931.2.382.entsmp #1 smp 
wed aug 6 17:18:52 edt 2003 i686 i686 i386 gnulinux '
config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686 
-Dmyhostname=localhost [EMAIL PROTECTED] -Dcc=gcc -Dcf_by=Red Hat, Inc. 
-Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr 
-Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib -Dusethreads 
-Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm 
-Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl 
-Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2 -g -pipe -march=i386 -mcpu=i686',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='3.2.2 20030222 (Red Hat Linux 3.2.2-5)', 
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=8
alignbytes=4, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.3.2'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic 
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES 
PERL_IMPLICIT_CONTEXT
  Locally applied patches:
MAINT18379
  Built under linux
  Compiled at Aug 13 2003 11:47:58
  @INC:
/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
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
.
$

 _/|__