Mod Perl 1 Install Apache 1

2003-09-09 Thread Paul Kraus
I am trying to make mod perl one and keep getting the following error.

Paul


perl Makefile.PL APACHE_SRC=../apache_1.3.28/src APACHE_PREFIX=/srv/www
DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 Make

r.o): In function `Perl_reentrant_retry':
reentr.o(.text+0x67b): undefined reference to `gethostent_r'
reentr.o(.text+0x83e): undefined reference to `getgrent_r'
reentr.o(.text+0xa39): undefined reference to `getnetent_r'
reentr.o(.text+0xbfe): undefined reference to `getpwent_r'
reentr.o(.text+0xdca): undefined reference to `getprotoent_r'
reentr.o(.text+0xfa2): undefined reference to `getservent_r'
/usr/local/ActivePerl-5.8/lib/5.8.0/i686-linux-thread-multi/CORE/libperl
.a(pp_sys.o): In function `Perl_pp_ghostent':
pp_sys.o(.text+0x9db6): undefined reference to `gethostent_r'
/usr/local/ActivePerl-5.8/lib/5.8.0/i686-linux-thread-multi/CORE/libperl
.a(pp_sys.o): In function `Perl_pp_gnetent':
pp_sys.o(.text+0xa1e6): undefined reference to `getnetent_r'
/usr/local/ActivePerl-5.8/lib/5.8.0/i686-linux-thread-multi/CORE/libperl
.a(pp_sys.o): In function `Perl_pp_gprotoent':
pp_sys.o(.text+0xa574): undefined reference to `getprotoent_r'
/usr/local/ActivePerl-5.8/lib/5.8.0/i686-linux-thread-multi/CORE/libperl
.a(pp_sys.o): In function `Perl_pp_gservent':
pp_sys.o(.text+0xa970): undefined reference to `getservent_r'
/usr/local/ActivePerl-5.8/lib/5.8.0/i686-linux-thread-multi/CORE/libperl
.a(pp_sys.o): In function `Perl_pp_gpwent':
pp_sys.o(.text+0xad2d): undefined reference to `getpwent_r'
/usr/local/ActivePerl-5.8/lib/5.8.0/i686-linux-thread-multi/CORE/libperl
.a(pp_sys.o): In function `Perl_pp_ggrent':
pp_sys.o(.text+0xb1ee): undefined reference to `getgrent_r'
collect2: ld returned 1 exit status
make[3]: *** [target_static] Error 1
make[3]: Leaving directory `/home/apache/src/apache_1.3.28/src'
make[2]: *** [build-std] Error 2
make[2]: Leaving directory `/home/apache/src/apache_1.3.28'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/apache/src/apache_1.3.28'
make: *** [apaci_httpd] Error 2



Re: where to find request object in mod_perl2

2003-08-29 Thread Paul G. Weiss
The doc you reference says that Apache-request should be avoided because 
it is expensive.  But does it in fact work?

-Paul

On Fri, 29 Aug 2003 10:17:57 -0700, Stas Bekman [EMAIL PROTECTED] wrote:

Igor Ivoilov wrote:
Hello all,

I have perl programs running under Apache::Registry.
Now I need to switch to mod_perl2 and can not find request object.
I used to get as
$r = Apache-request;
But this does not work under mod_perl2.
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache_E_gt_request_

__
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






--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: each considered harmful?

2003-06-15 Thread Paul Johnson
On Sun, Jun 15, 2003 at 09:35:38PM +0200, Marcin Kasperski wrote:
   Does there exist some way to protect before this problem (some kind of
   auto-destructor, finally, whatever which would automatically rewind
   the hash internal iterator while leaving the context)?
  
  Not really a mod_perl problem, but you can read about the solution in
  the docs for each.
  
  There is a single iterator for each hash, shared by all each,
  keys, and values function calls in the program; it can be reset
  by reading all the elements from the hash, or by evaluating keys
  HASH or values HASH.
 
 I found this note before asking, believe me... 
 But it seems to me that this solution is not satisfactory - calling
 'keys' or 'values' is inefficient and destroys most gains from
 iterating over the hash using each...

Calling keys() (or values()) in void context is quite efficient.

Whether or not you appreciate the aesthetics is perhaps quite another
matter.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net


Re: each considered harmful?

2003-06-14 Thread Paul Johnson
On Sat, Jun 14, 2003 at 11:33:17PM +0200, Marcin Kasperski wrote:
 Hmm, probably well known but ... I have not met any direct warning of
 this problem so far.
 
  our %SOME_CONFIG = (
 a = 1,
 b = 2,
 c = 3,
  );  
 
 ...
  while (my($k,$v) = each %SOME_CONFIG) {
  if( ... ) {
   return; # or last, or throw exception
  }
  }
 
 You probably see the problem - when this code is re-executed (next
 request), the loop iterates just over 'the rest' of the hash.
 
 Does there exist some way to protect before this problem (some kind of
 auto-destructor, finally, whatever which would automatically rewind
 the hash internal iterator while leaving the context)?

Not really a mod_perl problem, but you can read about the solution in
the docs for each.

There is a single iterator for each hash, shared by all each,
keys, and values function calls in the program; it can be reset
by reading all the elements from the hash, or by evaluating keys
HASH or values HASH.

perldoc -f each

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net


[mp2] win2000 + Apache::DBI + Oracle

2003-06-09 Thread Paul Simon
So, according to the docs,
http://perl.apache.org/docs/2.0/user/performance/mpm.html#Work_with_DataBases_under_Threaded_MPM,
using Apache::DBI doesn't do anything under
mp2+windows2000 ... What is the status of DBI::Pool?
These modules deal mainly with persistent database
connections. Is that correct?

Paul 


RE: [ANNOUNCE] Practical mod_perl is out!

2003-06-05 Thread Wilt, Paul
Stas / Eric:

Congratulations on a job well done!

Paul E Wilt 
Senior Principal Software Engineer
ProQuest Information and Learning
-
http://www.proquest.com  mailto:[EMAIL PROTECTED]
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: Geoffrey Young [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 2:12 PM
To: [EMAIL PROTECTED]
Subject: [ANNOUNCE] Practical mod_perl is out!


well, the (long) wait is now over - Practical mod_perl is here.

weighing in at a whopping 924 pages, Practical mod_perl really needs no 
introduction for those that are already familiar with the mod_perl Guide. 
however, from the ORA catalog description:

From writing and debugging scripts to keeping your server running without 
failures, the techniques in this book will help you squeeze every ounce of 
power out of your server. True to its title, this is the practical guide to 
mod_perl.

O'Reilly has a sample chapter online

   http://www.oreilly.com/catalog/pmodperl/chapter/ch06.pdf

the book's official website is

   http://www.modperlbook.org/

where you will find links to ways to purchse the book.

kudos Stas and Eric!

--Geoff


Problem adding mod_perl to my web server config.

2003-04-06 Thread Paul Adair
I recently attempted to add mod_perl to my web server configuration.
Here is my current web server info.
Apache/2.0.44 (Unix) mod_ssl/2.0.44 OpenSSL/0.9.7a DAV/2 PHP/4.3.1
Sun-ONE-ASP/4.0.0
There are no problems with this config and everything work ok.

I went through all of the config/setup docs on the web.
I received an error while doing the make test.
The error seemed to be tied with the mod_casp2 modules for Sun Chilisoft
ASP.
I figured maybe it has never tested it with this module so I proceeded with
the make install.
The make install seemed to go ok and it placed the mod_perl.so file in my
apache2/modules directory.

I then added the LoadModule mod_perl modules/mod_perl.so to my httpd.conf
file.
When attempting to start the web server I get the following error.

I went through as much of the documentation that I could and I cannot find
anything wrong at this time.

Is there something else that needs to run at the end of the make test that
my server did not complete
because of the mod_casp2 problem?

For now I removed the LoadModule mod_perl modules/mod_perl.so from my
httpd.conf and everything
is working fine again on server start.

Below are the 2 telnet session cuts with errors while doing the make test
and the ./apachectl startssl

Any help appreciated.
Thanks, Paul.


- Start make
test 
tia:root /opt/mod_perl-1.99_08make test
cd src/modules/perl  make -f Makefile.modperl
mksh: Warning: newline is not last character in file Makefile.modperl
Current working directory /opt/mod_perl-1.99_08/src/modules/perl
/usr/local/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \
t/TEST -clean
APACHE_USER= APACHE_GROUP= APACHE_PORT= APACHE= APXS= \
/usr/local/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \
t/TEST
/usr/local/apache2/bin/httpd  -d /opt/mod_perl-1.99_08/t -f
/opt/mod_perl-1.99_08/t/conf/httpd.conf -DAPACHE2
using Apache/2.0.44 (prefork MPM)

waiting for server to start: ..[Sun Apr 06 23:22:05 2003] [info] 20 Apache::
modules loaded
[Sun Apr 06 23:22:05 2003] [info] 5 APR:: modules loaded
[Sun Apr 06 23:22:05 2003] [info] base server + 5 vhosts ready to run tests
mod_casp2: config directory not set yet, aborting.

waiting for server to start: giving up after 61 secs
!!! server failed to start! (t/logs/error_log wasn't created, start the
server in the debug mode)
*** Error code 1
make: Fatal error: Command failed for target `run_tests'
- End make
test 


- Start web
server 
tia:root /usr/local/apache2/bin./apachectl startssl
Syntax error on line 3 of /usr/local/apache2/conf/httpd.conf:
Can't locate API module structure `mod_perl' in file
/usr/local/apache2/modules/mod_perl.so: ld.so.1:
/usr/local/apache2/bin/httpd:
fatal: mod_perl: can't find symbol
- End start web
server 



Re: Problem adding mod_perl to my web server config.

2003-04-06 Thread Paul Adair
My appologies, forgot the bug report t/REPORT script output.
Here is the bug report.

Paul.

-8-- Start Bug Report 8--
1. Problem Description:

  [DESCRIBE THE PROBLEM HERE]

2. Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_AP_PREFIX= /usr/local/apache2
  MP_GENERATE_XS  = 1
  MP_INST_APACHE2 = 1
  MP_LIBNAME  = mod_perl
  MP_USE_DSO  = 1
  MP_USE_STATIC   = 1


*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.44
Server built:   Mar 20 2003 21:35:14
Server's Module Magic Number: 20020903:0
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6
 -D APR_USE_PROC_PTHREAD_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/usr/local/apache2
 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf


*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos solaris 5.8 generic_108528-11 sun4u sparc sunw,ultra-5_10 '
config_args='-Dcc=gcc -B/usr/ccs/bin/'
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=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='gcc -B/usr/ccs/bin/', ccflags
='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-fno-strict-aliasing'
ccversion='', gccversion='3.1', gccosandvers='solaris2.8'
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=8
alignbytes=8, prototype=define
  Linker and Libraries:
ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -lgdbm -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -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'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Jul 22 2002 02:55:19
  %ENV:
PERL_LWP_USE_HTTP_10=1
  @INC:
/usr/local/lib/perl5/5.8.0/sun4-solaris
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl
.


3. This is the core dump trace: (if you get a core dump):

  [CORE TRACE COMES HERE]

This report was generated by t/REPORT on Mon Apr  7 05:09:43 2003 GMT.

-8-- End Bug Report --8--

Note: Complete the rest of the details and post this bug report to
dev at perl.apache.org. To subscribe to the list send an empty
email to [EMAIL PROTECTED]

tia:root /opt/mod_perl-1.99_08cat mybug

-8-- Start Bug Report 8--
1. Problem Description:

  [DESCRIBE THE PROBLEM HERE]

2. Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_AP_PREFIX= /usr/local/apache2
  MP_GENERATE_XS  = 1
  MP_INST_APACHE2 = 1
  MP_LIBNAME  = mod_perl
  MP_USE_DSO  = 1
  MP_USE_STATIC   = 1


*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.44
Server built:   Mar 20 2003 21:35:14
Server's Module Magic Number: 20020903:0
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6
 -D APR_USE_PROC_PTHREAD_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/usr/local/apache2
 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf


*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos solaris 5.8 generic_108528-11 sun4u sparc sunw,ultra-5_10 '
config_args='-Dcc=gcc -B/usr/ccs/bin

[mp2] make test errors

2003-04-03 Thread Paul Simon
Is this something to be worried about? Or can I
continue with make install? Please help.

System: FreeBSD 4.8-RELEASE
Server version: Apache/2.0.45

I received the following summary from make test:

Failed Test   Stat Wstat Total Fail  Failed  List
of Failed
---
apr/perlio.t11   11 100.00%  1-11
apr/threadmutex.t33 100.00%  1-3
4 tests skipped.
*** server localhost:8529 shutdown
!!! error running tests (please examine
t/logs/error_log)
*** Error code 1

The error_log follows:
END in modperl_extra.pl, pid=57443
[Thu Apr 03 19:37:27 2003] [notice] Apache/2.0.45
(Unix) mod_perl/1.99_08 Perl/v5.8.0 configured --
resuming normal operations
[Thu Apr 03 19:37:27 2003] [info] Server built: Apr  3
2003 09:02:09
[Thu Apr 03 19:37:27 2003] [debug] prefork.c(1039):
AcceptMutex: flock (default: flock)
[Thu Apr 03 19:37:28 2003] [error] server reached
MaxClients setting, consider raising the MaxClients
setting
[Thu Apr 03 19:38:37 2003] [info] [client 127.0.0.1]
TestAPI::aplog test in progress
[Thu Apr 03 19:38:37 2003] [debug]
/usr/src/mod_perl-1.99_08/t/response/TestAPI/aplog.pm(43):
log_serror test ok
[Thu Apr 03 19:38:37 2003] [debug]
/usr/src/mod_perl-1.99_08/t/response/TestAPI/aplog.pm(46):
(20007)No time was provided and one was required.:
log_serror test 2 ok
[Thu Apr 03 19:38:37 2003] [debug]
/usr/src/mod_perl-1.99_08/t/response/TestAPI/aplog.pm(49):
[client 127.0.0.1] (20007)No time was provided and one
was required.: log_rerror test ok
[Thu Apr 03 19:38:37 2003] [error] $r-log_error test
ok
[Thu Apr 03 19:38:37 2003] [error] $s-log_error test
ok
[Thu Apr 03 19:38:37 2003] [debug]
/usr/src/mod_perl-1.99_08/t/response/TestAPI/aplog.pm(63):
TestAPI::aplog test done
[Thu Apr 03 19:38:37 2003] [warn] ApacheApache-warn
test ok
[Thu Apr 03 19:38:37 2003] [warn] $s-warn test ok
[Thu Apr 03 19:40:25 2003] [error] [client 127.0.0.1]
mkdir /usr/src/mod_perl-1.99_08/t/htdocs/perlio:
Permission denied at
/usr/src/mod_perl-1.99_08/Apache-Test/lib/Apache/TestUtil.pm
line 128

[Thu Apr 03 19:40:50 2003] [error] [client 127.0.0.1]
Can't locate APR/ThreadMutex.pm in @INC (@INC
contains: /usr/src/mod_perl-1.99_08/t
/usr/src/mod_perl-1.99_08/blib/lib/Apache2
/usr/src/mod_perl-1.99_08/blib/arch/Apache2
/usr/src/mod_perl-1.99_08/Apache-Test/lib
/usr/src/mod_perl-1.99_08/lib
/usr/src/mod_perl-1.99_08/blib/lib
/usr/src/mod_perl-1.99_08/blib/arch
/usr/src/mod_perl-1.99_08/t/response
/usr/src/mod_perl-1.99_08/t/protocol
/usr/src/mod_perl-1.99_08/t/hooks
/usr/src/mod_perl-1.99_08/t/filter
/usr/src/mod_perl-1.99_08/t/htdocs/testdirective/perlmodule-vh
/usr/src/mod_perl-1.99_08/t/htdocs/testdirective/main
/usr/local/lib/perl5/5.8.0/i386-freebsd
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl) at
/usr/src/mod_perl-1.99_08/t/response/TestAPR/threadmutex.pm
line 17.

[Thu Apr 03 19:41:08 2003] [error] Apache::log_error
test ok
[Thu Apr 03 19:44:29 2003] [error] [client 127.0.0.1]
File does not exist:
/usr/src/mod_perl-1.99_08/t/htdocs/nope
[Thu Apr 03 19:45:57 2003] [error] [client 127.0.0.1]
need AuthName: /TestModperl::setauth
[Thu Apr 03 19:46:40 2003] [info] removed PID file
/usr/src/mod_perl-1.99_08/t/logs/httpd.pid (pid=57444)
[Thu Apr 03 19:46:40 2003] [notice] caught SIGTERM,
shutting down
END in modperl_extra.pl, pid=57444

Thanks
Paul


=
'Ideals are like stars. We may never reach them, but we use them to chart our course.' 
-- Unknown


compile apache with mod_perl

2003-02-12 Thread Jozwiak, Paul
Does anyone know why I keep getting:

[Wed Feb 12 10:35:03 2003] [notice] child pid 312 exit signal Segmentation
Fault (11)

in my error_log?  I have tried rebuilding the machine, installing older
versions of apache, different C compilers, changing my mod_perl versions and
still get this message every time I try to surf to the machine I just setup.
When I start apache, it appears to start but when I surf to it, I get Page
Cannot be displayed.  This is a list of modules I install prior to compiling
apache with mod_perl:

Data::Dumper (should be part of Perl install)
Digest
MIME
URI
HTML-Parser 2.x (not 3.x)
LockSimple
DBI 1.20
DBD::Sybase 0.94 or greater
DBD::Oracle 1.12
libnet  
libwww
Crypt::SSLeavy
Jcode
Unicode::String
Unicode::Map8
Unicode::Map
Proc::Simple

Could one of these be causing the problem.  I am at my wits end.  Any
suggestions would be awesome.  Also, if I comment out the LoadModule
perl_module libexec/libperl.so, in my httpd.conf file, it works like a
champ.

Thanks,

Paul


 NOTICE  
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information.  Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.
Any opinions expressed in this email are those of the individual and not
necessarily those of the company.
All liability for viruses is excluded to the fullest extent permitted by
law.





compile apache with mod_perl

2003-02-12 Thread Jozwiak, Paul
Does anyone know why I keep getting:

[Wed Feb 12 10:35:03 2003] [notice] child pid 312 exit signal Segmentation
Fault (11)

in my error_log?  I have tried rebuilding the machine, installing older
versions of apache, different C compilers, changing my mod_perl versions and
still get this message every time I try to surf to the machine I just setup.
When I start apache, it appears to start but when I surf to it, I get Page
Cannot be displayed.  This is a list of modules I install prior to compiling
apache with mod_perl:

Data::Dumper (should be part of Perl install)
Digest
MIME
URI
HTML-Parser 2.x (not 3.x)
LockSimple
DBI 1.20
DBD::Sybase 0.94 or greater
DBD::Oracle 1.12
libnet
libwww
Crypt::SSLeavy
Jcode
Unicode::String
Unicode::Map8
Unicode::Map
Proc::Simple

Could one of these be causing the problem.  I am at my wits end.  Any
suggestions would be awesome.  Also, if I comment out the LoadModule
perl_module libexec/libperl.so, in my httpd.conf file, it works like a
champ.

Thanks,

Paul



 NOTICE  
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information.  Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.
Any opinions expressed in this email are those of the individual and not
necessarily those of the company.
All liability for viruses is excluded to the fullest extent permitted by
law.





Perl interface to the Apache server API

2003-01-25 Thread Paul Dyer
Hi,

Does anyone know if this interface has been abandoned in verion 2.0??   
At perl.apache.org/docs/1.0/api/index.html, there is documentation for 
the 1.0 API.  Not only is the documentation missing in 2.0, but it 
appears to not have be included??

Please let me know what is expected of 2.0 as it relates to the Perl 
interface.

Thanks,

Paul



Re: Re-installing 1.99_08 binary or 1.99_05 RPM in Red Hat 8 [mp2]

2003-01-15 Thread Paul Simon
--- Jon [EMAIL PROTECTED] wrote:

 This RPM was working before, so all my messing
 around has broken something 
 I can't find.  If the recommendation is to ditch the
 RPM and proceed with 
 the new binary then that's fine.
 
 thanks again, jon
 
Red Hat's RPM seems very friendly at first then it
turns into the devil from hell, at least for me :) I
had the same problem as you when installing Perl 5.8
and apache/mod_perl on RH 7.1 using RPM. Everything
was a dependency issue and got F'ed up. I finally
learned how to build from source...   




Re: 1.3.27 DSO hassles

2003-01-15 Thread Paul Weiss
Hi--

I also had this problem when I built on Solaris (2.7).

Here is how I fixed it:

The symbol is in libgcc.a.  Use
  gcc -print-libgcc-file-name
to see where that file is.

Now, delete mod_negotiation.so and re-make.
See how make does the link.
Then, just re-link adding the file to the command line.

I think you have to do it for one other module as well, but I
don't remember which one.

I never came up with a fully automated way to do it, but I didn't
rebuild Apache that often.


-P

- Original Message -
From: Sinclair, Alan (CORP, GEAccess) [EMAIL PROTECTED]
To: Sinclair, Alan (CORP, GEAccess) [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 12:40 PM
Subject: RE: 1.3.27 DSO hassles


 I was attempting to configure mod_perl first before factoring in mod_ssl.
I
 cannot find the library that contains the symbol __floatdisf. It's not in
 libcrypt or libssl libraries from openssl, it does not appear to be in any
 library in /usr/lib or /lib. The symbol is not defined in any Apache
object
 file either. I'm kinda stumped ont this. I was thinking of upgrading to
 Solaris 8.

 Thanks
 as


 -Original Message-
 From: Stas Bekman [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 13, 2003 4:29 PM
 To: Sinclair, Alan (CORP, GEAccess)
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: 1.3.27 DSO hassles


 Sinclair, Alan (CORP, GEAccess) wrote:
  All,
  Having been successfully using modperl for the last 2 years statically
  linked with Apache, I have been trying again to make modperl work with
  1.3.27 when the Apache core modules are loaded as DSOs. There has been
 some
  traffic in the past on this subject and I checked the archives  and
 followed
  through on some of the suggestions
  - Recompiled perl 5.6 with the --Ubincompat5005 option for specific use
 with
  modperl
  - Setup modperl using the perl compiled with --Ubincompat5005
  - I use the following configure options for the APACI for Apache 1.3.27
  ./configure --prefix=/opt/apache-so \
  --enable-rule=SHARED_CORE \
  --enable-module=most \
  --enable-shared=max \
  --activate-module=src/modules/perl/libperl.a \
  --disable-shared=perl
 
  Apache is compiled and statically links modperl without any problems
  (Solaris 2.6). When Apache is executed, I receive this error:
  fatal: relocation error: file /opt/apache-so/libexec/mod_negotiation.so:
  symbol __floatdisf: referenced symbol not found
  I have tried the recommendations, specifically the issue with perl's
 malloc
  on Solaris which can be corrected with the --Ubincompat5005  option.

 There were some suggestions offered in this thread (large files CFLAGS?)
 http://marc.theaimsgroup.com/?t=10168427183r=1w=2
 Though I didn't see a success report.

 If somebody on Solaris 2.6 were able to get it to work, please chime in.

 __
 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





Apache::MP3

2003-01-03 Thread paul . barker



Hi All

This may be off topic but since it's Friday I thought I'd have a quick play and
install Apache::MP3.

I've built the module and followed the Apache config instructions on the web
site, but every time I try to access the /music location I get a 500 error and
the following line in error_log :

[Fri Jan  3 13:24:49 2003] [error] Can't locate object method new via package
Apache (perhaps you forgot to load Apache?) at
/opt/perl/lib/site_perl/5.6.1/Apache/MP3.pm line 80.

Any ideas why it's not working. I'm using other modules without issue.

Perl 5.6.1
Mod Perl 1.27
HPUX 11i

startup.pl

#!/usr/local/bin/perl -w
# to load this file when the server starts, add this to httpd.conf:
# PerlRequire /path/to/startup.pl

BEGIN{
        use Apache ();
        use lib Apache-server_root_relative('lib/site_perl/5.6.1');
}

# make sure we are in a sane environment.
$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die GATEWAY_INTERFACE not Perl!;

use Apache::Registry ();
use Apache::Constants();
use DBI ();
use DBD::mysql ();
use CGI qw(-compile :all);
use CGI::Application;
use GD;
use MP3::Info;
use Apache::MP3;

1;

Cheers

Paul



***
Important.
Confidentiality: This communication is intended for the above-named person and
may be confidential and/or legally privileged. Any opinions expressed in this
communication are not necessarily those of the company. If it has come to you
in error you must take no action based on it, nor must you copy or show it to
anyone; please delete/destroy and inform the sender immediately.

Monitoring/Viruses
Orange may monitor all incoming and outgoing emails in line with current
legislation.  Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.

Orange PCS Limited is a subsidiary of Orange SA and is registered in England No
2178917, with its address at St James Court, Great Park Road, Almondsbury Park,
Bradley Stoke, Bristol BS32 4QJ.
***




Apache::DBI

2003-01-02 Thread Paul Simon
Hi all

I have a feeling this may be [OT], take it to the DBI
list... But I'm hoping to eliminate as much as
possible any suspicion that Apache::DBI/mod_perl is
causing my headache. I'm trying to push this platform
at work ;) If anyone can shed some light on this then
I'd be very appreciative, of course. 

I have what's becoming a reoccuring problem with an
app running under:

Apache/2.0.42 (Win32) mod_perl/1.99_08-dev Perl/v5.8.0


I'm using Apache::compat and Apache::DBI for
persistent database connections. 

Here are the configurations in the httpd.conf file:

#
LoadFile C:/Perl/bin/perl58.dll
LoadModule perl_module modules/mod_perl.so
 PerlOptions +Parent  
 PerlInterpStart 10
 PerlInterpMax 50
 PerlInterpMaxSpare 25 
PerlRequire C:/Apache2pl/conf/startup.pl
#-

The startup.pl looks like this:
#-
#!C:/Perl/bin/Perl.exe
use Apache2();
use lib('/Apache2pl/lib/perl/Apache');


use ModPerl::Registry();
use Apache::compat;
use Apache::DBI;
use DBI;
use DBD::ODBC;
use HTML::Template;
use CGI::Lite;

#$Apache::DBI::DEBUG = 2;

use Standard3;

1;
#-

For completeness sake, here's the connection string:
my $DBH  = DBI-connect(DBI:ODBC:$db, $user, $pass,
{ RaiseError = 1, PrintError = 1, AutoCommit = 1 })
or print( Unable to connect to Database:
$DBI::errstr\n ) ;

Finally, the error message I'm getting is:

DBI-connect(pdb9) failed:
[Oracle][ODBC][Ora]ORA-12535: TNS:operation timed out
(SQL-S1000)(DBD: db_login/SQLConnect err=-1) at
/Apache2/lib/perl/Apache/Standard3.pm line 29 

This problem goes away if the ORacle server(on it's
own hardware running windows 2000 pro) is restarted.
The last time this happened the box Oracle resides on
needed a cold reboot! So far, I haven't had to restart
apache.

Could Apache::DBI or mod_perl2 cause this behavior?

Paul 



windows and apache/mod_perl?

2002-12-16 Thread Paul Simon
Is it worth installing apache 1.x and mod_perl 1.x on
windows if apache2/mod_perl2/perl5.8 run on windows?

Thanks



Re: Perl Cookbook modperl chapter

2002-12-11 Thread Paul Lindner
Hi,

I only speak for myself, but I am happy to see mod_perl covered in the
Perl Cookbook.  Why you ask?  I see the inclusion of mod_perl helping
increase the size of the mod_perl pie.  A rising tide lifts all
boats.  

I'm not too worried about the content.  I'm sure it will be top-notch.
Consider that the Perl Cookbook already gives you good coverage of
several complex domain specific areas: DBI, LWP, CGI, Sockets, Tk,
etc.

I'll be very happy if the Perl Cookbook gets the novice mod_perl
programmer started and then leads them to the mpDC, which is really an
intermediate to advanced work.

My only concern?  If the Perl Cookbook gets any larger I might throw
out my back carrying it around :)  

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



syntax and sanity check?

2002-11-12 Thread Paul
I'm doing a 45 minute seminar at UAB tomorrow on mod_perl, and would be
very grateful if anyone would point out holes in this code before I try
to show it to a roomful of attendees:


#~~
# module for Apache/mod_perl PerlPostReadRequestHandler to redirect
#  users on the nonsecure port over to SSL (hopefully saving bookmarks)
#__
 
package Apache::PortCorrect;  # define the package space

use strict;   # pragma for clean code
use Apache::Constants qw( :response );# installed with mod_perl
 
sub handler {# default methodname
my($r) = _; # the request object
return OK if 443 == $r-get_server_port; # ok if already SSL
my $uri = https://myserver.com; # DNS literal *
. (split /\s+/, $r-the_request)[1]; # requested page
$r-custom_response(MOVED,$uri); # for re-request
return MOVED;# page moved!
}
1; # guarantee return code for load


and


PerlPostReadRequestHandler +Apache::PortCorrect



If someone is interested in seeing the rest of the presentation, I've
posted it at http://thesilentbard.com/ACM%20Seminar.ppt -- if you'd
care to post it online anywhere else, please let me know first, but
that's cool, too. Any corrections are welcome.

I know it isn't clean (I tried to make sure it fit on one slide and
didn't get too complicated for the topic, hence such non-portable
features as the DNS literal, etc), but suggestions are still very
welcome.

Thanks all,
Paul

__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2



RE: Problems compiling mod_perl1.27 under IRIX64...

2002-10-28 Thread Wilt, Paul
DeAngelo:

I have not heard any reply to this email.  We currently build
mod_perl 1.27 for SGI IRIX64 using standard techniques and do
*not* experience any build problem.  If you send me the output
of the par command I may be able to help you pinpoint your
problem.

Thanks
Paul E Wilt 
Senior Principal Software Engineer
Proquest Information and Learning
-
http://www.proquest.com  mailto:paul.wilt;il.proquest.com
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: Wilt, Paul [mailto:pwilt;xanedu.com] 
Sent: Friday, October 25, 2002 9:53 AM
To: 'DeAngelo Lampkin'; 'Ged Haywood'
Cc: 'mod_perl Mailing List'
Subject: RE: Problems compiling mod_perl1.27 under IRIX64...


DeAngelo:

Have you run the par command I sent you?

par -s -SS -o debug.out -a 128 make

This should help figure out which file is missing.

Thanks
Paul E Wilt 
Senior Principal Software Engineer
Proquest Information and Learning
-
http://www.proquest.com  mailto:paul.wilt;il.proquest.com
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com] 
Sent: Thursday, October 24, 2002 4:49 PM
To: Ged Haywood
Cc: mod_perl Mailing List
Subject: RE: Problems compiling mod_perl1.27 under IRIX64...


Hi Ged,

All the sources are in places I own and they were all built under my account
originally.  I built as root in a last ditch effort to resolve the problem,
but the same error as I orginally posted occured yet again (i.e., ld32:
FATAL 9: I/O error (1110): No such file or directory ).  Yeah, I was
grasping at straws. ;)

And yeah, I 've read the docs.  As I said before, this problem has occured
before because  I've seen the nearly exact same description in an archive of
this mailing list. You can check out the original here:
http://www.mail-archive.com/modperl;apache.org/msg28889.html . However there
was never a resolution posted( or at least none that I could find.)

Thanks,
DeAngelo

-Original Message-
From: Ged Haywood [mailto:ged;www2.jubileegroup.co.uk]
Sent: Thursday, October 24, 2002 12:24 PM
To: DeAngelo Lampkin
Cc: mod_perl Mailing List
Subject: RE: Problems compiling mod_perl1.27 under IRIX64...


Hi there,

On Thu, 24 Oct 2002, DeAngelo Lampkin wrote:

 [snip] the make step ran fine [snip]
 However, the make install step crapped out and I got the following error:
 
 Warning: You do not have permissions to install into
/usr/local/lib/perl5/site_perl/5.6.1/IP27-irix at /usr/local/lib/perl5/5.
 6.1/IP27-irix/ExtUtils/Install.pm line 85.
 mkdir /usr/local/lib/perl5/site_perl/5.6.1/IP27-irix/auto/Apache:
Permission denied at /usr/local/lib/perl5/5.6.1/IP27-irix/Ex
 tUtils/Install.pm line 139
 Indeed, I don't have permissions to write there, which lead me to
 believe that this whole thing was a simple permissions error.

Not unless you're building somewhere strange.  Where did you put the
sources?  I usually use something like this:

/home/ged/src/apache_1.3.27

and

/home/ged/src/mod_perl-1.27

then su root only at the final make install step.

 However, when I had the system admin run perl Makefile.PL  as root,

Don't do that.  You should build as an ordinary user.
Have you read through the installation section of the mod_perl Guide?
See the mod_perl home page for a link to the Guide.

73,
Ged.



RE: Irix64 mod_perl compile problems - SOLVED.

2002-10-28 Thread Wilt, Paul
DeAngelo:

Your sysadmin sure has a good eye!  The link that you pointed to earlier:

http://www.mail-archive.com/modperl;apache.org/msg28889.html

has the following lines in it:

  Error Output for sanity check 
 cd ..; cc -n32  -DIRIX -DMOD_PERL -DUSE_PERL_SSI
-D_BSD_TYPES
=== *** -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0
 -I/usr/local/include -DLANGUAGE_C -DUSE_HSREGEX -DNO_DL_NEEDED
-D_BSD_TYPES
=== *** -D_BSD_TIME -woff 1009 1110 1174 1184 1552 -OPT:Olimit=0
 -I/usr/local/include -DLANGUAGE_C `./apaci` -I.
 -I/users/webuser/perl/lib/5.6.1/IP25-irix/CORE-o helpers/dummy
 helpers/dummy.c   -L/usr/local/lib32 -L/usr/local/lib -Wl,-woff,84
 
/users/webuser/perl/lib/5.6.1/IP25-irix/auto/DynaLoader/DynaLoader.a
 -L/users/webuser/perl/lib/5.6.1/IP25-irix/CORE -lperl -lm -lc 
 ld32: FATAL 9: I/O error (1110): No such file or directory
 cc INTERNAL ERROR:  /usr/lib32/cmplrs/ld32 returned non-zero status
32
 *** Error code 1 (bu21)
 = End of Error Report =

Note the two lines I indicated with the === *** above:  The -woff
argument *DOES* need
the commas to pass this cc command-line parameter to the linker backend.
Later this week
I will examine our builds to see why this does *not* seem to cause the same
problem on our end.

Thanks
Paul E Wilt  
Senior Principal Software Engineer
Proquest Information and Learning
-
http://www.proquest.com  mailto:paul.wilt;il.proquest.com
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com] 
Sent: Monday, October 28, 2002 12:23 PM
To: [EMAIL PROTECTED]
Subject: Irix64 mod_perl compile problems - SOLVED.


Apparently some of the compile options need to be delimited by commas for
compilers on SGI IRIX64 system.  

For a quick refresher on what the error was, the following error shows up
during the Makefile.PL run:
ld32: FATAL 9: I/O error (1110): No such file or directory

The way to get rid of that helpful error message is to scroll down to the
line in the Makefile.PL script that says the following (line 525 in this
version of the Makefile.PL script):

if($PERL_EXTRA_CFLAGS) {
$PERL_EXTRA_CFLAGS = join( , split(,,  $PERL_EXTRA_CFLAGS));
$PERL_EXTRA_CFLAGS =~ s/\s+/ /g;
}

And then comment out the line with the join so that it looks like this:
if($PERL_EXTRA_CFLAGS) {
#$PERL_EXTRA_CFLAGS = join( , split(,,
$PERL_EXTRA_CFLAGS));
$PERL_EXTRA_CFLAGS =~ s/\s+/ /g;
}

And now Makefile.PL runs without giving you that error message and things
compile as they are meant to!  


Thanks to my system admin for noticing that commas that were present in
template files were not showing up in output and quickly drawing a
connection.  Also, I appreciate the help from Ged and Paul for eliminating
other possible sources for error.


Until next time,

DeAngelo



RE: Irix64 mod_perl compile problems - SOLVED.

2002-10-28 Thread Wilt, Paul
DeAngelo:

Quick follow-up!  I looked in our setups and found that we
actually use the LFLAGS (versus the CFLAGS) variable to pass
this information to the linker.  Try uncommenting the change
you made and set the LFLAGS (ours has -g -n32 -mips4 -Wl,-woff,84) and
see if that works.  If so then we need to have Stas add an extra message
about compiling on IRIX.

Paul E Wilt 
Senior Principal Software Engineer
Proquest Information and Learning
-
http://www.proquest.com  mailto:paul.wilt;il.proquest.com
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: Wilt, Paul [mailto:pwilt;xanedu.com] 
Sent: Monday, October 28, 2002 1:23 PM
To: 'DeAngelo Lampkin'; '[EMAIL PROTECTED]'
Subject: RE: Irix64 mod_perl compile problems - SOLVED.


DeAngelo:

Your sysadmin sure has a good eye!  The link that you pointed to earlier:

http://www.mail-archive.com/modperl;apache.org/msg28889.html

has the following lines in it:

  Error Output for sanity check 
 cd ..; cc -n32  -DIRIX -DMOD_PERL -DUSE_PERL_SSI
-D_BSD_TYPES
=== *** -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0
 -I/usr/local/include -DLANGUAGE_C -DUSE_HSREGEX -DNO_DL_NEEDED
-D_BSD_TYPES
=== *** -D_BSD_TIME -woff 1009 1110 1174 1184 1552 -OPT:Olimit=0
 -I/usr/local/include -DLANGUAGE_C `./apaci` -I.
 -I/users/webuser/perl/lib/5.6.1/IP25-irix/CORE-o helpers/dummy
 helpers/dummy.c   -L/usr/local/lib32 -L/usr/local/lib -Wl,-woff,84
 
/users/webuser/perl/lib/5.6.1/IP25-irix/auto/DynaLoader/DynaLoader.a
 -L/users/webuser/perl/lib/5.6.1/IP25-irix/CORE -lperl -lm -lc 
 ld32: FATAL 9: I/O error (1110): No such file or directory
 cc INTERNAL ERROR:  /usr/lib32/cmplrs/ld32 returned non-zero status
32
 *** Error code 1 (bu21)
 = End of Error Report =

Note the two lines I indicated with the === *** above:  The -woff
argument *DOES* need
the commas to pass this cc command-line parameter to the linker backend.
Later this week
I will examine our builds to see why this does *not* seem to cause the same
problem on our end.

Thanks
Paul E Wilt  
Senior Principal Software Engineer
Proquest Information and Learning
-
http://www.proquest.com  mailto:paul.wilt;il.proquest.com
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com] 
Sent: Monday, October 28, 2002 12:23 PM
To: [EMAIL PROTECTED]
Subject: Irix64 mod_perl compile problems - SOLVED.


Apparently some of the compile options need to be delimited by commas for
compilers on SGI IRIX64 system.  

For a quick refresher on what the error was, the following error shows up
during the Makefile.PL run:
ld32: FATAL 9: I/O error (1110): No such file or directory

The way to get rid of that helpful error message is to scroll down to the
line in the Makefile.PL script that says the following (line 525 in this
version of the Makefile.PL script):

if($PERL_EXTRA_CFLAGS) {
$PERL_EXTRA_CFLAGS = join( , split(,,  $PERL_EXTRA_CFLAGS));
$PERL_EXTRA_CFLAGS =~ s/\s+/ /g;
}

And then comment out the line with the join so that it looks like this:
if($PERL_EXTRA_CFLAGS) {
#$PERL_EXTRA_CFLAGS = join( , split(,,
$PERL_EXTRA_CFLAGS));
$PERL_EXTRA_CFLAGS =~ s/\s+/ /g;
}

And now Makefile.PL runs without giving you that error message and things
compile as they are meant to!  


Thanks to my system admin for noticing that commas that were present in
template files were not showing up in output and quickly drawing a
connection.  Also, I appreciate the help from Ged and Paul for eliminating
other possible sources for error.


Until next time,

DeAngelo



RE: Problems compiling mod_perl1.27 under IRIX64...

2002-10-25 Thread Wilt, Paul
DeAngelo:

Have you run the par command I sent you?

par -s -SS -o debug.out -a 128 make

This should help figure out which file is missing.

Thanks
Paul E Wilt 
Senior Principal Software Engineer
Proquest Information and Learning
-
http://www.proquest.com  mailto:paul.wilt;il.proquest.com
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com] 
Sent: Thursday, October 24, 2002 4:49 PM
To: Ged Haywood
Cc: mod_perl Mailing List
Subject: RE: Problems compiling mod_perl1.27 under IRIX64...


Hi Ged,

All the sources are in places I own and they were all built under my account
originally.  I built as root in a last ditch effort to resolve the problem,
but the same error as I orginally posted occured yet again (i.e., ld32:
FATAL 9: I/O error (1110): No such file or directory ).  Yeah, I was
grasping at straws. ;)

And yeah, I 've read the docs.  As I said before, this problem has occured
before because  I've seen the nearly exact same description in an archive of
this mailing list. You can check out the original here:
http://www.mail-archive.com/modperl;apache.org/msg28889.html . However there
was never a resolution posted( or at least none that I could find.)

Thanks,
DeAngelo

-Original Message-
From: Ged Haywood [mailto:ged;www2.jubileegroup.co.uk]
Sent: Thursday, October 24, 2002 12:24 PM
To: DeAngelo Lampkin
Cc: mod_perl Mailing List
Subject: RE: Problems compiling mod_perl1.27 under IRIX64...


Hi there,

On Thu, 24 Oct 2002, DeAngelo Lampkin wrote:

 [snip] the make step ran fine [snip]
 However, the make install step crapped out and I got the following error:
 
 Warning: You do not have permissions to install into
/usr/local/lib/perl5/site_perl/5.6.1/IP27-irix at /usr/local/lib/perl5/5.
 6.1/IP27-irix/ExtUtils/Install.pm line 85.
 mkdir /usr/local/lib/perl5/site_perl/5.6.1/IP27-irix/auto/Apache:
Permission denied at /usr/local/lib/perl5/5.6.1/IP27-irix/Ex
 tUtils/Install.pm line 139
 Indeed, I don't have permissions to write there, which lead me to
 believe that this whole thing was a simple permissions error.

Not unless you're building somewhere strange.  Where did you put the
sources?  I usually use something like this:

/home/ged/src/apache_1.3.27

and

/home/ged/src/mod_perl-1.27

then su root only at the final make install step.

 However, when I had the system admin run perl Makefile.PL  as root,

Don't do that.  You should build as an ordinary user.
Have you read through the installation section of the mod_perl Guide?
See the mod_perl home page for a link to the Guide.

73,
Ged.



RE: Problems compiling mod_perl1.27 under IRIX64...

2002-10-24 Thread Wilt, Paul
Ged:

Actually I believe that it is ld32 that is complaining about not finding the
file.

Deangelo:

Can you send the command line you use to try to build this puppy?

You can use the par command (similar to the Linux strace command) to
see which file it has not found.  It produces a lot of output but may
give you some ideas as to where to look.

The following is the command you would execute (if it is the make that
fails):

par -s -SS -o debug.out -a 128 make

Thanks
Paul E Wilt 
Senior Principal Software Engineer
Proquest Information and Learning
-
http://www.proquest.com  mailto:paul.wilt;il.proquest.com
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: Ged Haywood [mailto:ged;www2.jubileegroup.co.uk] 
Sent: Thursday, October 24, 2002 8:33 AM
To: DeAngelo Lampkin
Cc: [EMAIL PROTECTED]
Subject: Re: Problems compiling mod_perl1.27 under IRIX64...


Hi there,

On Wed, 23 Oct 2002, DeAngelo Lampkin wrote:

  Whenever I try to compile mod_perl1.27 on SGI IRIX64 I get the following
error message at the end of the make process:
  
   Error Output for sanity check 
  cd ..; cc -n32  -DIRIX -DMOD_PERL -DUSE_PERL_SSI -D_BSD_TYPES
-D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0 -DLANGUAGE_C
-DUSE_HSREGEX -DNO_DL_NEEDED -D_BSD_TYPES -D_BSD_TIME -woff 1009 1110 1174
1184 1552 -OPT:Olimit=0 -DLANGUAGE_C `./apaci` -I.
-I/usr/local/lib/perl5/5.6.1/IP27-irix/CORE-o helpers/dummy
helpers/dummy.c   -L/usr/local/lib32 -L/usr/local/lib -Wl,-woff,84
/usr/local/lib/perl5/5.6.1/IP27-irix/auto/DynaLoader/DynaLoader.a
-L/usr/local/lib/perl5/5.6.1/IP27-irix/CORE -lperl -lm -lc
  ld32: FATAL 9: I/O error (1110): No such file or directory
  *** Error code 2 (bu21)
  = End of Error Report =
  
  All of the directories listed are present.

Is ld32 present?

73,
Ged.



RE: Problems compiling mod_perl1.27 under IRIX64...

2002-10-24 Thread Wilt, Paul
DeAngelo:

Use PREP_HTTPD=1 instead of DO_HTTPD=1 and then do your
make and make install  Please capture the output:

make 1make.dbg 21   (for bash / ksh)

Then if you could put make.dbg somewhere some of us can
get to it we will see what we can do.

If the make and make install are successful with
PREP_HTTPD=1 then you must go your Apache source directory
and configure / compile it there with the following option
included on the configure:
  --activate-module=src/modules/perl/libperl.a

Then make the Apache server.

Thanks
Paul E Wilt 
Senior Principal Software Engineer
Proquest Information and Learning
-
http://www.proquest.com  mailto:paul.wilt;il.proquest.com
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com] 
Sent: Thursday, October 24, 2002 1:09 PM
To: Wilt, Paul; Ged Haywood
Cc: [EMAIL PROTECTED]
Subject: RE: Problems compiling mod_perl1.27 under IRIX64...


I made an error in my original message.  It is actually the Makefile.PL step
that fails, not the make itself.  The command 
I'm attempting to run is:
  % perl Makefile.PL APACHE_SRC=../apache_1.3.xx/src \
DO_HTTPD=1 USE_APACI=1 EVERYTHING=1

Thanks for the help,
DeAngelo

P.S.  Please, disregard double message.  I had a delay in getting my inbox
updated and so I thought I had not emailed the question to the right place.

-Original Message-
From: Wilt, Paul [mailto:pwilt;xanedu.com]
Sent: Thursday, October 24, 2002 5:48 AM
To: 'Ged Haywood'; DeAngelo Lampkin
Cc: '[EMAIL PROTECTED]'
Subject: RE: Problems compiling mod_perl1.27 under IRIX64...


Ged:

Actually I believe that it is ld32 that is complaining about not finding the
file.

Deangelo:

Can you send the command line you use to try to build this puppy?

You can use the par command (similar to the Linux strace command) to
see which file it has not found.  It produces a lot of output but may
give you some ideas as to where to look.

The following is the command you would execute (if it is the make that
fails):

par -s -SS -o debug.out -a 128 make

Thanks
Paul E Wilt 
Senior Principal Software Engineer
Proquest Information and Learning
-
http://www.proquest.com  mailto:paul.wilt;il.proquest.com
300 North Zeeb Rd  Phone: (734) 302-6777
Ann Arbor, MI 48106Fax:   (734) 302-6779
-



-Original Message-
From: Ged Haywood [mailto:ged;www2.jubileegroup.co.uk] 
Sent: Thursday, October 24, 2002 8:33 AM
To: DeAngelo Lampkin
Cc: [EMAIL PROTECTED]
Subject: Re: Problems compiling mod_perl1.27 under IRIX64...


Hi there,

On Wed, 23 Oct 2002, DeAngelo Lampkin wrote:

  Whenever I try to compile mod_perl1.27 on SGI IRIX64 I get the following
error message at the end of the make process:
  
   Error Output for sanity check 
  cd ..; cc -n32  -DIRIX -DMOD_PERL -DUSE_PERL_SSI -D_BSD_TYPES
-D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0 -DLANGUAGE_C
-DUSE_HSREGEX -DNO_DL_NEEDED -D_BSD_TYPES -D_BSD_TIME -woff 1009 1110 1174
1184 1552 -OPT:Olimit=0 -DLANGUAGE_C `./apaci` -I.
-I/usr/local/lib/perl5/5.6.1/IP27-irix/CORE-o helpers/dummy
helpers/dummy.c   -L/usr/local/lib32 -L/usr/local/lib -Wl,-woff,84
/usr/local/lib/perl5/5.6.1/IP27-irix/auto/DynaLoader/DynaLoader.a
-L/usr/local/lib/perl5/5.6.1/IP27-irix/CORE -lperl -lm -lc
  ld32: FATAL 9: I/O error (1110): No such file or directory
  *** Error code 2 (bu21)
  = End of Error Report =
  
  All of the directories listed are present.

Is ld32 present?

73,
Ged.



Re: Problems writing binary uploaded data...

2002-10-23 Thread paul . barker

Hmm, I've tried your code on my system and it does exactly what it's supposed
to. I get the same filesizes reported at the destination end and in the script
as the file is on my PC HDD.

Have you tried a different file ? Do you always loose the same amount ?

Cheers

Paul



***
Important.
Confidentiality: This communication is intended for the above-named person and
may be confidential and/or legally privileged. Any opinions expressed in this
communication are not necessarily those of the company. If it has come to you
in error you must take no action based on it, nor must you copy or show it to
anyone; please delete/destroy and inform the sender immediately.

Monitoring/Viruses
Orange may monitor all incoming and outgoing emails in line with current
legislation.  Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.

Orange PCS Limited is a subsidiary of Orange SA and is registered in England No
2178917, with its address at St James Court, Great Park Road, Almondsbury Park,
Bradley Stoke, Bristol BS32 4QJ.
***




Re: current state of conf/code, feedback?

2002-10-16 Thread Paul Simon
I was cruising with Apache::DBI, definitely better than the way I had it, but now suddenly I'm getting this error:
DBD::ODBC::dr FETCH failed: handle 1 is owned by thread 1e90bdc not current thread b0f18c (handles can't be shared between threads and your driver may need a CLONE method added) at C:/Perl/site/lib/Apache/DBI.pm line 64. 
What's going on?
Perrin Harkins [EMAIL PROTECTED] wrote:
Paul Simon wrote: I currently have CGI pages caching on the client side, which  is helping some, but I'm also going to experiment with CGI::Cache. There are some mod_perl specific version of this too, like the one from the mod_perl Developer's Cookbook (Apache::CacheContent), but these are mod_perl 1.x and probably require work to get them running on mod_perl 2. Traditionally this has mostly been done with a caching reverse proxy, and that's another angle you could try. What kind of trouble is  there for having use DBI and use HTML::Template in both startup.pl and  Snoopy.pm (besides being redundant)?None. That is the right thing to do, because it preloads the modules (by having them in startup.pl) and documents the dependencies (by putting in Snoopy.pm). Since Snoopy.pm is the meat and  pototoes, should it also be in startup.pl?Yes. Does declaring Class  variables, such as the DBI handle, offer any benefits (or pain) of a  shared connection? You're getting yourself into major trouble there. You should use Apache::DBI instead. The way you have it now (with the connection code in the "main" section of Snoopy.pm), that database connection will be created when you use the module in startup.pl. Apache will then fork and multiple children will try to share the same $DBH. Disaster.Also, your solution will not try to reconnect if it loses its connection. Apache::DBI will. And you are creating a closure here with your $DBH which might come back to bite you later if your module gets automatically reloaded when you change it.- Perrin

current state of conf/code, feedback?

2002-10-15 Thread Paul Simon
Hi all
I'm asking for some insight, guidance, comments from the list. 
I'm currently running a pilot appunder win2000 + apache 2.0.42 + perl5.8 + mod_perl. Mostly, it's running great, much faster than the vanilla CGI version. I think the database connection is slowing it down though... I currently have CGI pages caching on the client side, which is helping some, but I'm also going to experiment with CGI::Cache.
The application uptime is 2 weeks, but that's includingprayers.
Here are the specifics. 
In the http.conf, I have:
LoadFile "C:/Perl/bin/perl58.dll"LoadModule perl_module modules/mod_perl.soPerlRequire "C:/Apache2/conf/startup.pl"PerlInterpStart 5PerlInterpMaxSpare 5PerlInterpMax 20PerlInterpMaxRequests 5
In an included snoopy.conf:
Alias /snoopy/ "C:/Apache2/application/snoopy2/"Location "/snoopy/" ExpiresActive On ExpiresDefault "now plus2 days" SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI/Location
In the startup.pl:
#!C:/Perl/bin/Perl.exeuse Apache2();use ModPerl::Registry ();use DBI;use DBD::ODBC;use HTML::Template;1;
I'm running the app under ModPerl::Registry (evident enough). The bulk of it is in Snoopy.pm, which Iimplement via OO method calls. Currently, each of 5 cgi pageshas ause Snoopy.pm at the top.
The beginning of Snoopy.pm, before the actual methods,looks like:
# Since each CGI page has use Snoopy.pm, I put these directives at the top of# Snoopy module.I thought itmight be more efficient to have them in one place, # instead ofrepeating them in each of the 5 CGI pages.use CGI::Lite;use HTTP::Date;use DBI;use HTML::Template;use HTML::Parser;
package Snoopy;use strict;
#--# Class Data#--###connect to ODBC-ORACLE my $db = ''; my $user = ''; my $pass = ''; my $DBH = DBI-connect("DBI:ODBC:$db", $user, $pass, { RaiseError = 1, PrintError = 1, AutoCommit = 1 }) or die( "Unable to connect to Database: $DBI::errstr\n" ) ; $DBH-{LongReadLen} = 1;
 our $AUTOLOAD;
 ### Set the tracing level to 2 and prepare #DBI-trace( 1, 'dbitrace2.log' ); #--sub new{ my ($class, @args) = @_; my $obj = {};
 # Bless the hash reference obj. Create an object. bless $obj, $class;  $obj-{dbh} = \$DBH;   # Call _init $obj-_init(@args);
 # return Object. return $obj;}
methods ...
1;
Is there anything here that spells trouble? What kind of troubleis therefor having use DBI and use HTML::Templatein bothstartup.pl and Snoopy.pm (besides being redundant)?Since Snoopy.pm is the meat and pototoes, should it also be in startup.pl? Does declaring Class variables, such as the DBI handle, offer any benefits (or pain)of a shared connection? 
Are there anyobvious (or not soobvious)issues with these configurations or codethatshould be knocking me in the head?
Thanks,Paul

Re: Apache::DBI for persistent connections

2002-10-15 Thread Paul Simon
I was under the impression that Apache::DBI isn't compatible for this set up:
win2000 + apache2.0.42 + perl5.8 + mod_perl1.99
For a multi threaded environment, isn't Apache::DBIPool necessary? I'd rather use Apache::DBI.
Rafiq Ismail [EMAIL PROTECTED] wrote:
On Tue, 15 Oct 2002, Paul Simon wrote: variables, such as the DBI handle, offer any benefits (or pain) of a shared connection?You might want to try using Apache::DBI for persistent connections.It is completely transparent to your code, in terms of changes.R.-- Senior ProgrammerBookings.nl--Me::[EMAIL PROTECTED]||www.dreamthought.comBudget hosting on my 10Mbit/backbone::[EMAIL PROTECTED]

Re: current state of conf/code, feedback?

2002-10-15 Thread Paul Simon
I have no choice about the win thing. I'd feel much happier using linux and mod_perl 1.x as you suggest. 
I'm terribly frightenedaboutonly having2 weeks of uptime -that's what the prayings for :) But I'm putting my faith in this very new software and the wonderful people who have been cultivating and supporting it.
I wrecked that bike on my home from the universitysome years ago... It was my first and last motorcycle.
Thanks for the feedback,Paul
Ged Haywood [EMAIL PROTECTED] wrote:
Hi there,On Tue, 15 Oct 2002, Paul Simon wrote: I'm currently running a pilot app under win2000 + apache 2.0.42 + perl5.8 + mod_perl. Is there anything here that spells trouble?That win...thing?Seriously though, you're using very new software. If you want realstability I'd suggest Linux and versions 1.x of mod_perl and Apachemight be a shade more reliable at present. But if you are happy witha couple of weeks of uptime (I like to measure it in years...:) thenyou should be fine with what you're using.73,Ged.PS: Which bike got wrecked?

Re: current state of conf/code, feedback?

2002-10-15 Thread Paul Simon
I'm going to change the DBH code. I've witnessed a few problemsso far where the DBHhas crapped out. I'll try Apache::DBI. 
I've been wrapping my head around thereverse proxy cache, I have it set up on my home servers.It seems to be a really good solutionfor caching, but it'sfurther down the road for me... In the meantime, I'm going to try the CGI::Cache.
Got some work to do :)
Thanks for the tips and explanations,Paul
Perrin Harkins [EMAIL PROTECTED] wrote:
Paul Simon wrote: I currently have CGI pages caching on the client side, which  is helping some, but I'm also going to experiment with CGI::Cache. There are some mod_perl specific version of this too, like the one from the mod_perl Developer's Cookbook (Apache::CacheContent), but these are mod_perl 1.x and probably require work to get them running on mod_perl 2. Traditionally this has mostly been done with a caching reverse proxy, and that's another angle you could try. What kind of trouble is  there for having use DBI and use HTML::Template in both startup.pl and  Snoopy.pm (besides being redundant)?None. That is the right thing to do, because it preloads the modules (by having them in startup.pl) and documents the dependencies (by putting in Snoopy.pm). Since Snoopy.pm is the meat and  pototoes, should it also be in startup.pl?Yes. Does declaring Class  variables, such as the DBI handle, offer any benefits (or pain) of a  shared connection? You're getting yourself into major trouble there. You should use Apache::DBI instead. The way you have it now (with the connection code in the "main" section of Snoopy.pm), that database connection will be created when you use the module in startup.pl. Apache will then fork and multiple children will try to share the same $DBH. Disaster.Also, your solution will not try to reconnect if it loses its connection. Apache::DBI will. And you are creating a closure here with your $DBH which might come back to bite you later if your module gets automatically reloaded when you change it.- Perrin

Does Apache::NavBar exist ?

2002-10-14 Thread paul . barker


Hi

I've just been perusing the docs on perl.apache.com and in the Cute Tricks
section there is mention of a module called Apache::NavBar being available from
CPAN. I may be blind but I can't find it. Does it exist ?

Regards

Paul



***
Important.
Confidentiality: This communication is intended for the above-named person and
may be confidential and/or legally privileged. Any opinions expressed in this
communication are not necessarily those of the company. If it has come to you
in error you must take no action based on it, nor must you copy or show it to
anyone; please delete/destroy and inform the sender immediately.

Monitoring/Viruses
Orange may monitor all incoming and outgoing emails in line with current
legislation.  Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.

Orange PCS Limited is a subsidiary of Orange SA and is registered in England No
2178917, with its address at St James Court, Great Park Road, Almondsbury Park,
Bradley Stoke, Bristol BS32 4QJ.
***




Re: [Very, VERY OT] Re: [Mason] ANNOUNCE: Mason 1.15

2002-10-14 Thread Paul

   Dave, just interesting. What does ginsu knives means :?
  throw in a set of free ginsu knives (think sushi) for people who
  would buy some crap on the TV shopping program. 
 We have this kind of TV ads on German TV now, too. Badly dubbed. So
 badly it's getting worth watching if you have a cheap sense of humor

Do they still saw up the cola can and then slice the tomato? =o)
Yeah, I know, I'm showing my age

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



Re: migrating from Apache to iPlanet; any mod_perl counterpart? [FOUND?]

2002-10-14 Thread Paul


I just got this note from Dennis, and it looks like (at first cursory
glance) *EXACTLY* what I wanted (God bless you Dennis! =o)

I forward it to the list for the benefit of others that might find it
helpful in similar situations. I have removed Dennis' email address and
phone number, in case he didn't want them shared; I trust the rest of
the note is sufficiently impersonal that he won't mind me reposting it
to the list.

Paul

--- Dennis Daupert address deleted wrote:
 Hi Paul,
 
 Although I've not had the time or mandate to get into the perl/nsapi
 connection, I run several iPlanet web servers, and remembered at some
 not-too-distant time ago reading in the iPlanet README about perl and
 nsapi  I did a google on perl and nsapi, and got some hits such as:
 
 http://www.perldoc.com/cpan/Netscape/Server.html
 
 Here's a sample article from the iPlanet knowledgebase pertaining to
 nsapi equivalents to Apache Addhandler command:
 
 http://knowledgebase.iplanet.com/ikb/kb/articles/4905.html
 
 The knowledgebase url itself:
 
 http://knowledgebase.iplanet.com/NASApp/ikb/index.jsp
 
 This site may lead you to some useful info:
 
 http://developer.iplanet.com/
 
 Also, a perl +nsapi search on http://devedge.netscape.com/ could be
 useful.
 
 g'luck
 
 /dennis


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



Re: [OT] migrating from Apache to iPlanet; any mod_perl counterpart?

2002-10-13 Thread Paul


*They* don't know what they mean, but we're getting a variance for Perl
(supposedly). No such luck for mysql or apache


--- Lupe Christoph [EMAIL PROTECTED] wrote:
 On Wednesday, 2002-10-09 at 18:22:24 -0400, Steve Grazzini wrote:
  On Wed, Oct 09, 2002 at 02:43:18PM -0700, Paul wrote:
 
   The company is making us migrate (some baloney about being
 legally
   vulnerable because we're using open source)
 
  If they won't let you use open-source tools, then the
  answer is definitely yes.  (Perl is open-source.)
 
 As are all modules on CPAN. If they really mean this, you will have
 to
 rewrite in a language that has a closed-source compiler, using only
 modules that are not available in source. Do not use any code
 examples,
 too, just to be sure ... =:-|
 
 If you want to be sure you are implementing what *they* want, you
 better
 ask *them* where Open Source stops. Steve's point about perl being
 open source may be important for your career ;-) (As in
 Career-limiting
 move)
 
  And migrating from a relational database to LDAP might
  not be as obvious as... oh well.
 
 Depending on what you do, it may not even be suitable. LDAP organizes
 data hierarchically. It hangs attributes off objects. Generally, LDAP
 databases are slower than RDBMSes.
 
 HTH,
 Lupe Christoph
 -- 
 | [EMAIL PROTECTED]   |  
 http://www.lupe-christoph.de/ |
 | Big Misunderstandings #6398: The Titanic was not supposed to be
|
 | unsinkable. The designer had a speech impediment. He said: I have 
|
 | thith great unthinkable conthept ...  
|


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



Re: [OT] migrating from Apache to iPlanet; any mod_perl counterpart?

2002-10-11 Thread Paul

 FastCGI and PersistentPerl are both working equivalents to mod_perl
 with similar capabilities and performance.  They should work just
 fine with iPlanet.

Oh yeah 
Awesome. I will look into that.

 I don't see why that would be any different from what you currently
 have.  Any state mechanism requires cookies, URLs, or hidden form
 values for maintaining at least a unique ID on the client side. 
 There is no other way to do it.

Agreed -- and I apologize for the confusion -- but I may be blowing
smoke from my lack of knowledge, and misstating my thoughts because of
false assumptions. What I mean is that before I had a custom access
handler installed to use MySQL without resorting to state management
other than the http NCSA Basic Authentication header, and I didn't
think I'd be able to use those tools to emulate the same methodology,
though I know I can get the same result with a redesign. 
 
 Again, I don't understand what you think you're going to lose.  All
 the basic data available under mod_perl is available under everything
 else as well, albeit with a slightly different API.

Different is acceptable.
Thanks, Perrin -- that sort of feedback is the reason lists are so
handy.

Paul

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



Re: [OT] migrating from Apache to iPlanet; any mod_perl counterpart?

2002-10-11 Thread Paul


--- Perrin Harkins [EMAIL PROTECTED] wrote:
 Paul wrote:
  What I mean is that before I had a custom access
  handler installed to use MySQL without resorting to state
  management other than the http NCSA Basic Authentication header
 
 You should be able to do that with FastCGI.  Not sure about 
 PersistentPerl.  You'd have to ask the author.
 
 - Perrin

Looks like the FastCGI binaries are only available for Windows
versions. We'll be on Sun Solaris, but I can probably recompile the
source, if that doesn't cause the open-source police to come get me.

I still think we're miscommunicating, though. We weren't even using
Apache::Registry; the CGI speed improvement of mod_perl is only of
incidental interest to us. The API hooks were what we were using.
FastCGI (as I understand it, e.g., from
http://www.fastcgi.com/devkit/doc/fastcgi-whitepaper/fastcgi.htm )
doesn't offer any API, though the iPlanet version at
http://www.caraveo.com/fastcgi/ seems to be implemented with NSAPI in
such a way that it *sort* of does anyway. It's theoretically *better*
for the niche it was written to fill, but that's functional
specialization, where mod_perl is more versatile.
The main thing is just that mod_perl/mysql was just such a sweet
solution -- I really hate to see it go.

Anyway, I've beaten this thread enough. Thanks again, and I'll try to
stop spamming the list now. =o)

Paul

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



Re: [OT] migrating from Apache to iPlanet; any mod_perl counterpart?

2002-10-11 Thread Paul


--- Perrin Harkins [EMAIL PROTECTED] wrote:
 Paul wrote:
  Looks like the FastCGI binaries are only available for Windows
  versions. We'll be on Sun Solaris, but I can probably recompile the
  source, if that doesn't cause the open-source police to come get
 me.
 
 I'm afraid it's not as obvious how to do it as it is with mod_perl. 
 You may need to ask on the mailing list.

g figures. :)

  I still think we're miscommunicating, though. We weren't even using
  Apache::Registry; the CGI speed improvement of mod_perl is only of
  incidental interest to us. The API hooks were what we were using.
  FastCGI (as I understand it, e.g., from
  http://www.fastcgi.com/devkit/doc/fastcgi-whitepaper/fastcgi.htm )
  doesn't offer any API
 
 Everything offers an API.  CGI is an API.

Point taken -- I'm thinking too rigidly.

 If I understand correctly, you just want to write a custom access 
 control thingy. 

Predominantly. Though there are a few other things we do as well,
that's the most complex/important one, and I think some of the other
things could be functionally folded into that.

 FastCGI calls that an authorizer and it is documented 
 in that whitepaper.
 - Perrin

Ah! I see it now. SWEET!

Thanks AGAIN Perrin! =o)

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



unsubscribe RTFM's not working, lol....

2002-10-11 Thread Paul


Okay, at least twice now I've sent this person explicit (and even
polite) instructions on how to unsubscribe, once even including an
explicit link  for each of these two email addresses. Both times I
included instructions on how to get more instructions, both via email,
and with reference links. He still keeps mailing me (personally) these
notes, apparently without reading my responses. I don't want to just
filter him out and ignore him, but I'm about to unless someone has
another suggestion.

Can someone help me be nice, or is it beyond hope?

--- spam [EMAIL PROTECTED] wrote:
 ATTACHMENT part TEXT message/rfc822 
 From: spam [EMAIL PROTECTED]
 Subject: remove my name from your list
 Date: Thu, 10 Oct 2002 09:55:58 -0400
 
 please remove my address from this list
 
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



Re: OT: Are things really this bad?

2002-10-11 Thread Paul


--- Todd Finney [EMAIL PROTECTED] wrote:
 I was looking at jobs.perl.org this afternoon, and there are a lot of
 things on there like this:
   - we'll pay you when we have some money
   - $20-$30 an hour
   - Do all this, we'll give you $75.
 I'm not *really* in the market, but more work is always better.   Are
 the jobs on there really representative of what's going on out there,
 or are they somehow skewed?
 Just curious.
 cheers,
 Todd

I think that's mostly the going rate (so to speak) for those jobs that
aren't important enough to hire a real employee. If you think a
quick-and-dirty contract can get a good enough job done for that, then
why would you pay more? The kid next door can hack out a couple of
scripts to handle your problem, and earn enough money for a hot date in
the process. (I just recently moved my personal website when it became
obvious that my host was actually a 16-yr-old reseller with no clue,
though there are plenty of capable young'uns out there.)

But if you have a genuine business enterprise that MUST function
smoothly, then you not only need an initial write but ongoing upkeep as
well, and that means hiring someone for the long term. Professional
contractors tend to get more than this, as do permanent employees in
most cases ($20-$30/hr and better *plus* insurance and a guarantee of
an ongoing 40hr week).

If I'm too far off base, someone please correct me.

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



Re: [OT] migrating from Apache to iPlanet; any mod_perl counterpart?

2002-10-10 Thread Paul


--- Perrin Harkins [EMAIL PROTECTED] wrote:
 Perrin Harkins wrote:
  Paul wrote:
  
  I know there are servlets, but I was led to believe that I would
  almost be able to drop my mod_perl modules into the iPlanet
server,
  as if it has some equivelent functionality. If so, I can't find
any
  evidence of it, and I'm rather skeptical.
  
  I think your only hope is FastCGI, or PerlEx if you're running it
  on Windows.
 
 Wait, there is also PersistentPerl (formerly SpeedyCGI), and Matt's 
 PPerl.  Both on CPAN.
 - Perrin

The problem isn't so much the registry as the API.
I've done a lot of server customization, such as embedding the MySQL
database for flexible, customizable password access and such,
including:
- automatic forwarding to SLL at the same document URL (new protocol)
- making the server restricted by *default*, so only nonrestricted
  directories need to be specified (there are few)
- allowing .htaccess files to specify individual files and
  subdirectories with alternate passwords
etc.

I don't know how I'm going to do all that with iPlanet/LDAP without a
lot of recoding, probably in Java. :(


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



Re: [OT] migrating from Apache to iPlanet; any mod_perl counterpart?

2002-10-10 Thread Paul


--- Perrin Harkins [EMAIL PROTECTED] wrote:
 Paul wrote:
  The problem isn't so much the registry as the API.
 
 Any use of the Apache API would have to be rewritten.  There is no
 way around that.

That's what I figured.

  I don't know how I'm going to do all that with iPlanet/LDAP without
  a lot of recoding, probably in Java. :(
 
 There's nothing you've mentioned so far that requires Java.  It would
 be much faster to port it to FastCGI or the like.

I just meant that iPlanet's internal API was probably going to require
Java or C, and not Perl. I can redo most of it as CGI if necessary, but
some of that will require slieght-of-code like embedding data in
cookies or hidden form elements c though I do that some already
anyway. I just prefer having all the data from the engine available
from the request object, and I'm gonna miss that. 

Still, the SUN rep talks a good game, and my paycheck demands that I
play the game the way the big bosses want.

As an aside, this should begin next month. Would the list be interested
in a running commentary of how things are done on the new one, or would
that be too much spammy line-noise?


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



[OT] migrating from Apache to iPlanet; any mod_perl counterpart?

2002-10-09 Thread Paul


I know there are servlets, but I was led to believe that I would almost
be able to drop my mod_perl modules into the iPlanet server, as if it
has some equivelent functionality. If so, I can't find any evidence of
it, and I'm rather skeptical.

The company is making us migrate (some baloney about being legally
vulnerable because we're using open source), and I've got to convert a
nice, simple, efficient Apache/mod_perl/MySQL solution to iPlanet/LDAP.

Am I looking at a complete redesign here?

===

Also, it looks as though we're going to end up with iPlanet web *and*
LDAP servers on this midrange Sun Solaris server, trying to coexist
with an Oracle data warehouse as well as *ALL* our ongoing production
code, which constitutes sometimes as much as 80-hours runtimes for some
of the heavy hitters. We're out of budget and wrestling with a demented
IT department that insists we can't use free stuff that's *ALREADY*
working.

If anyone has a miraculous suggestion, I will light many candles in
your honor. *sigh*


Paul

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com



Re: Response Headers

2002-10-04 Thread Paul Simon

Randy Kobes <[EMAIL PROTECTED]>wrote:

On Thu, 3 Oct 2002, Paul Simon wrote:  How do HTTP headers work under Registery::ModPerl? set up: windows2000 apache2.0.42 mod_perl/1.99_08-dev Perl/v5.8.0  I had to comment out the following in the CGI script:  #print "Expires: " . time2str( time() + 432000 ) . "\n"; #print "Content-type: text/html\n\n";  because it would print out as content to the browser??  This is in the conf file:  Alias /standards/ "C:/Apache2/application/standards2/"  SetHandler perl-script PerlResponseHandler ModPerl::Registry #PerlOptions +ParseHeaders Options +ExecCGI   If somebody could point me in the right direction -  Thanks.If you send the headers yourself, as, eg,print "Content-type: text/html\n\n";in the script, then you should havePerlOptions +ParseHeaders in the relevant section. If you don't send the header yourself,Apache will send one for you, based on, in particular, theDefaultType setting. In this case you shouldn't havePerlOptions +ParseHeadersin that section. As you found, other combinations can leadto a double set of headers sent, resulting in one ofthem appearing in the browser.-- best regards,randy kobes
I have a pilot web app running with the above set-up (It's working really well, *fingers crossed*). 
I understand your explanation. I'm still having problems with sending an Expires in the header. You mentioned, "Apache will send one for you, based on, in particular, the DefaultType setting."
Can Iconfigurethe DefaultType in apache?
The way I have it now is:print "Content-type: text/html\n\n";in the CGI scriptAnd in the conf file:
Location "/standards/" SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI/Location
Here's the response headerfrom the server:
HTTP/1.1 200 OKDate: Fri, 04 Oct 2002 13:40:30 GMTServer: Apache/2.0.42 (Win32) mod_perl/1.99_08-dev Perl/v5.8.0Connection: closeContent-Type: text/html; charset=ISO-8859-1
My current goalis to cache the pages on the client browser. Ultimately, I'd like to cache on the server side too ( as you would've guessed :) )I'm learning as I go... Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

Re: Response Headers

2002-10-04 Thread Paul Simon
Ok. I answered my own question, using mod_expires. A little off OT...
Paul Simon <[EMAIL PROTECTED]>wrote:

 
Randy Kobes <[EMAIL PROTECTED]>wrote: 

On Thu, 3 Oct 2002, Paul Simon wrote:  How do HTTP headers work under Registery::ModPerl? set up: windows2000 apache2.0.42 mod_perl/1.99_08-dev Perl/v5.8.0  I had to comment out the following in the CGI script:  #print "Expires: " . time2str( time() + 432000 ) . "\n"; #print "Content-type: text/html\n\n";  because it would print out as content to the browser??  This is in the conf file:  Alias /standards/ "C:/Apache2/application/standards2/"  SetHandler perl-script PerlResponseHandler ModPerl::Registry #PerlOptions +ParseHeaders Options +ExecCGI   If somebody could point me in the right direction -  Thanks.If you send the headers yourself, as, eg,print "Content-type: text/html\n\n";in the script, then you should havePerlOptions +ParseHeaders in the relevant section. If you don't send the header yourself,Apache will send one for you, based on, in particular, theDefaultType setting. In this case you shouldn't havePerlOptions +ParseHeadersin that section. As you found, other combinations can leadto a double set of headers sent, resulting in one ofthem appearing in the browser.-- best regards,randy kobes
I have a pilot web app running with the above set-up (It's working really well, *fingers crossed*). 
I understand your explanation. I'm still having problems with sending an Expires in the header. You mentioned, "Apache will send one for you, based on, in particular, the DefaultType setting."
Can Iconfigurethe DefaultType in apache?
The way I have it now is:print "Content-type: text/html\n\n";in the CGI scriptAnd in the conf file:
Location "/standards/" SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI/Location
Here's the response headerfrom the server:
HTTP/1.1 200 OKDate: Fri, 04 Oct 2002 13:40:30 GMTServer: Apache/2.0.42 (Win32) mod_perl/1.99_08-dev Perl/v5.8.0Connection: closeContent-Type: text/html; charset=ISO-8859-1
My current goalis to cache the pages on the client browser. Ultimately, I'd like to cache on the server side too ( as you would've guessed :) )I'm learning as I go... 


Do you Yahoo!?New DSL Internet Access from SBC  Yahoo!Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

Another header question

2002-10-04 Thread Paul Simon
Is it possible for me to create aContent-Length header for aCGI script via ModPerl::Registry or Apache?
PaulDo you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

install/config mod_perl-2(1.99_08)

2002-10-03 Thread Paul Simon
Is there something in the configuration not jiving?
Windows 2000, Apache 2.0.42, mod_perl-2(1.99_08-dev via ppm)
In http.conf I have:Include conf/test.confAddHandler cgi-script .cgiIn test.conf I have:PerlRequire "C:/Apache2/conf/startup.pl"Location /test/ Options +ExecCGI SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders/Location#ScriptAlias /test/ "C:/Apache2/htdocs/test/"
startup.pl looks like:#!C:/Perl/bin/Perl.exeuse Apache2();use ModPerl::Registry ();1;
Apache starts up. I can see mod_perl loaded in via server-status. And when I call just the directory /test/, this what I get in the error log:
[error] 1932: ModPerl::Registry: C:/Apache2/htdocs/test/ not found or unable to stat
If I try to call index.cgi under /test/index.cgi, the page just hangs.index.cgi works as a straight CGI page. Here it is:#!C:/Perl/bin/Perl.exe
 print "Content-type: text/plain\n\n"; print "mod_perl 2.0 rocks!\n";
--- I'll keep trying. Hopefully, there's an easy solution to this. Thanks.Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

Re: install/config mod_perl-2(1.99_08)

2002-10-03 Thread Paul Simon
Randy Kobes <[EMAIL PROTECTED]>wrote: 

On Thu, 3 Oct 2002, Paul Simon wrote:  Is there something in the configuration not jiving?  Windows 2000, Apache 2.0.42, mod_perl-2(1.99_08-dev via ppm)  In http.conf I have: Include conf/test.conf AddHandler cgi-script .cgi  In test.conf I have: PerlRequire "C:/Apache2/conf/startup.pl"  Options +ExecCGI SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders  #ScriptAlias /test/ "C:/Apache2/htdocs/test/"  startup.pl looks like: #!C:/Perl/bin/Perl.exe use Apache2(); use ModPerl::Registry (); 1;  Apache starts up. I can see mod_perl loaded in via server-status. And when I call just the directory /test/, this what I get in the error log:  [error] 1932: ModPerl::Registry: C:/Apache2/htdocs/test/ not found or unable to statThis is OK - you normally don't want a directory listingfor locations that have scripts in them. If I try to call index.cgi under /test/index.cgi, the page just hangs. index.cgi works as a straight CGI page. Here it is: #!C:/Perl/bin/Perl.exe  print "Content-type: text/plain\n\n"; print "mod_perl 2.0 rocks!\n";  --- I'll keep trying. Hopefully, there's an easy solution to this. Thanks.Maybe not easy :) Using perl-5.6.1, and Apache-2.0.42, I foundthe above to also hang ... However, it worked as expected usingthe perl-5.8/Apache2 binary of perl-5.8-win32-bin.tar.gz underftp://theoryx5.uwinnipeg.ca/pub/other/. As there's issues withthreads on Win32 with perl-5.6.1, eventually perl-5.8 will be therecommended Win32 Perl for mod_perl-2; if possible, you may wantto give this a try.-- best regards,randy kobes

Almost easy. I have it running now with perl5.8.I'm going to pilot it...Thanks.PaulDo you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

Response Headers

2002-10-03 Thread Paul Simon
How do HTTP headers work under Registery::ModPerl?set up: windows2000 apache2.0.42 mod_perl/1.99_08-dev Perl/v5.8.0
I had to comment out the following in the CGI script:
#print "Expires: " . time2str( time() + 432000 ) . "\n";#print "Content-type: text/html\n\n";
because it would print out as content to the browser??
This is in the conf file:
Alias /standards/ "C:/Apache2/application/standards2/"Location "/standards/" SetHandler perl-script PerlResponseHandler ModPerl::Registry #PerlOptions +ParseHeaders Options +ExecCGI/Location
If somebody could point me in the right direction -
Thanks.Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

[mp2] Build problems on HPUX11.00 with HP ANSI C (aCC)

2002-09-26 Thread paul . barker


Hi All

I've spent the last two days reading various docs and posts trying to resolve
this problem. If this is a known issue or has been answered previously please
accept my apologies and by all means point me in the direction of the correct
documentation / newsgroup / mailing list archive.

I am attempting to build mod_perl from the 1.99_05 source with Apache 2.0.40 and
perl 5.8.0 both of which were built from source with the HP ANSI C compiler :

B3901BA   B.11.01.07 HP C/ANSI C Developer's Bundle for
HP-UX 11.00 (S800)

(I'm using the HP compiler because a) we have it available and it's recommended
in the Perl hpux.readme and  b) I had problems trying to build perl with gcc 3.x
as supplied via the HPUX Porting and Archive site)

Perl and Apache built without problems and Apache runs fine without mod-perl. (I
have served some test html and cgi queries fine)

During the mod-perl build I get the same warning from each component build :

cpp: /usr/local/lib/perl5/5.8.0/PA-RISC1.1-thread-multi/CORE/config.h, line
41: warning 2002: Redefinition of param names for macro __attribute__.

I tried to run a 'make test' anyhow since I've had cases in the past where
warnings similar to the above haven't caused any issues. When the test routine
tries to start it's httpd to test against it eventually falls over with the
following message :

*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST
/usr/local/apache2/bin/httpd  -d /oracle/db/GSE/04/techweb/mod_perl-1.99_05/t -f
/oracle/db/GSE/04/techweb/mod_perl-1.99_05/t/conf/httpd.conf -DAPACHE2
-DPERL_USEITHREADS
using Apache/2.0.40 (prefork MPM)

waiting for server to start:
.
waiting for server to start: giving up after 61 secs
!!! server failed to start! (t/logs/error_log wasn't created, start the server
in the debug mode)
*** Error exit code 1

In actual fact a server is started but the httpd process just spins consuming 
90% of one CPU and the only way to stop it is to issue a kill -9 (_SIGKILL) to
the process.

Has any one out there successful build on HPUX 11 ?

I have attached the output of t/REPORT.

Many thanks in advance.

Paul

-8-- Start Bug Report 8--
1. Problem Description:


2. Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_APXS= /usr/local/apache2/bin/apxs
  MP_GENERATE_XS = 1
  MP_LIBNAME = mod_perl
  MP_USE_DSO = 1
  MP_USE_STATIC  = 1


*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.40
Server built:   Sep 26 2002 08:50:18
Server's Module Magic Number: 20020628:0
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/usr/local/apache2
 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf


*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
osname=hpux, osvers=11.00, archname=PA-RISC1.1-thread-multi
uname='hp-ux tutdarlb b.11.00 a 9000831 282814 two-user license '
config_args='-de'
hint=previous, 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='cc', ccflags ='-D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE
-Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 +Z',
optimize='+O2 +Onolimit',
cppflags='-Aa -D__STDC_EXT__ -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L
-D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include
-D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z
-D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z'
ccversion='A.11.01.00', gccversion='', gccosandvers=''
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=8
alignbytes=8, prototype=define
  Linker and Libraries:
ld='/usr/bin/ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lnsl -lnm -lndbm -lmalloc -ldld -lm -lpthread -lc

Re: newbie: file uploads not working :(

2002-09-12 Thread Paul de Repentigny

Alan,

Much easier to read would be:

sub handler {
my $r = Apache::Request-new(shift);
my $file_name = $r-param('see_below');
my $file = $r-upload('see_below');
if ($file) {
# here you go...
# filehandle is in $file-fh;
}
}

On the HTML side, input type=file should read:
input type=file name=see_below

Note: If you ever use them in file posts, don't forget to clean the file
names, especially when it comes from Windows machine...

Paul.

Alan écrivit:

 Hi folks.  I'm new to the list, and relatively new to mod_perl, but a
 big project thrown my way put me right in the middle, and I think I've
 fared well so far, with one exception... file uploads.  I've based my
 code off the apache::request documentation and the file upload code
 snippet posted here and on the perl.apache.org site.
 
 I have the following configured:
 
 ...snip... 
 -





Re: lame load balancer, mod_proxy, and sticky sessions

2002-09-06 Thread Paul Lindner

On Fri, Sep 06, 2002 at 08:44:39AM -0400, Calbazana, Al wrote:
 Hello,
 
 I'd like to know if it is possible to use mod_proxy as a sticky session
 manager.  Basically, I'd like to put mod_proxy behind the load balancer and
 allow the proxy servers to talk to the mod_perl servers.  Unfortunately, the
 load balancer does not allow for sticky sessions and only bounces the user
 round-robin style.  I am playing with the idea of sending a cookie down to
 the client and using it to stick a user to a particular mod_perl server, but
 I'd like mod_proxy to figure it out which server and send the user to the
 defined machine.  I'd also like to enable a checking mechanism to
 determine if a mod_perl server is up before the user is sent to the location
 specified in the cookie.  If the machine that the client is stuck to is
 down, I'd like to reroute.
 
 I know high powered load balancers do this already, but I'd like to explore
 dedicating a few medium sized servers to do as there is surplus of these and
 f5's cost $$$.  I apologize in advance if this is a bit off topic!

Two things come to mind.  First mod_rewrite has plenty of features that
will let you do primitive load balancing.  See

  http://httpd.apache.org/docs/misc/rewriteguide.html

Look at the examples that show how to combine a cookie with the URI and
you can use regexes to control which host is chosen.

Also check out mod_backhand (discussed on this list, check the archives)

  http://www.backhand.org/

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: Apache::Util::ht_time outputs dates in local language

2002-09-06 Thread Paul Lindner

On Fri, Sep 06, 2002 at 05:03:32PM +0200, pascal barbedor wrote:
 
  When I have caching problems, I run my pages through cachability to find
 out
  where they are failing. Check it out at:
 
http://www.web-caching.com/cgi-web-caching/cacheability.py
 
  It reports on page headers as well as gives useful info like the
 following:
 
 
 Hi thanks
 
 this helped me determine why the cache did not work
 is it because the date format of Expires or Last-Modified was not RFC
 correct
 
 I noted on the occasion that Apache::Util::ht_time()
 outputs dates in locale language format (french for me)
 Mar, 12 Sept 2002 18:50:20 GMT
 instead of english ones

This function wraps an apache function (apr_ht_time()) which in
turn uses strftime() to do the conversion.

Try changing your LC_TIME or LANG variable before you start your
web server.  Perhaps start by setting LANG=C and go from there.

Consult the strftime() man page for details on the interaction
between the environment variables and the time output.

Cheers,
Paul

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



win32 apache2.0.40 mod_perl-2

2002-08-16 Thread Paul Simon
Hi all
I upgraded from apache2.0.39 to 40 and removed, installed mod_perl-2 via ppm. 
NowmyApache::Registry directory is not responding. The browser just hangs. Any tips on how I can troubleshoot this?
Everything isset up the way I had it workingfor2.0.39 and mod_perl-2
Thanks,paulDo You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs

Re: win32 apache2.0.40 mod_perl-2

2002-08-16 Thread Paul Simon
They do work as ordinary CGI scripts (thank goodness!). The same scripts worked under ModPerl::Registry before I upgraded everything. There are no messages in the error logs.
If I call the cgi page under ModPerl::Registry via a browser, it just hangs seemingly forever... 
I can tryinstalling a simple hello worldhandler, skipping ModPerl::Registry, and see if that works...
Thanks
Randy Kobes <[EMAIL PROTECTED]>wrote:
On Fri, 16 Aug 2002, Paul Simon wrote:  Hi all  I upgraded from apache2.0.39 to 40 and removed, installed mod_perl-2 via ppm.  Now my Apache::Registry directory is not responding. The browser just hangs. Any tips on how I can troubleshoot this?  Everything is set up the way I had it working for 2.0.39 and mod_perl-2   Thanks, paulIn addition to what Stas suggested ...- do you mean ModPerl::Registry scripts?- do the scripts still work under ordinary cgi?- are there any useful messages in the error log?-- best regards,randy kobesDo You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs

PerlResponseHandler ?

2002-08-15 Thread Paul Simon
Hi All
Can somebody answer this for me? Here are two directivesfor separate directories(1 and 2) torun under ModPerl::Registry (ModPerl::Registry is being called in via a perl startup.pl):
Location /mydir1 SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI/Location
Location /mydir2 SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI/Location
I'm wondering, Is it better to create one directive like
Location /perl SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI/Location
and put /mydir1 and /mydir2 in the /perl directory? Is it just a matter of managing directories or is there a memory or performance issue? I'd prefer to use the separate directive approach, but I want to make sure it's not causing extra overhead.
ThanksDo You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs

Re: variables not changing with modperl??

2002-08-13 Thread Paul Simon
Hi darren
Did you try starting apache with "httpd -X". It spawns only one process and that helps keep things inorder, as far as variable values. You can try trouble shooting with that.
darren chamberlain <[EMAIL PROTECTED]>wrote:
* Michael Drons <[EMAIL PROTECTED]>[2002-08-13 01:55]: Thanks for the link. I actually don't use functions. Everything is mostly in MAIN. Here is a snip of code: #!/usr/bin/perl -wT use strict; print ""; my $r = Apache-request; $r-content_type("text/html"); $r-status(200); my $auth_type = $r-auth_type; $cookie=$auth_type-key; ($user,$hash)=split(/:/,$cookie); read(STDIN, my $buffer, $ENV{'CONTENT_LENGTH'}); my @pairs = split(//, $buffer); foreach my $pair (@pairs) {  } What I am doing wrong? Everytime the script runs the values of the variables coming in change. Should I use the delete function and delete all of the variables at the end of the script? @pairs is what should change, but sometimes does not. I have tried to add a undef @pairs before the split, but no luck.Are you sure that this is the code that is running? It doesn't compile:$ perl#!/usr/bin/perl -wTuse strict;print "";my $r = Apache-request;$r-content_type("text/html");$r-status(200);my $auth_type = $r-auth_type;$cookie=$auth_type-key;($user,$hash)=split(/:/,$cookie);read(STDIN, my $buffer, $ENV{'CONTENT_LENGTH'});my @pairs = split(//, $buffer);foreach my $pair (@pairs) { }Global symbol "$cookie" requires explicit package name at - line 7.Global symbol "$user" requires explicit package name at - line 8.Global symbol "$hash" requires explicit package name at - line 8.Global symbol "$cookie" requires explicit package name at - line 8.Execution of - aborted due to compilation errorsMake those global symbols ($cookie, $user, and $hash) lexical (declarewith my) and the code will both compile and do what you expect (i.e.,not maintain values from call to call).You'll also want to print things *after* you set the content type andstatus, not before.(darren)--The biggest difference between time and space is that you can'treuse time.-- Merrick FurstDo You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs

Re: Mail::Sender modperl.

2002-07-23 Thread Paul Lindner

Another chunk of sample code is available in chapter 15 of The
mod_perl Developer's Cookbook.  The Cookbook::Mail module uses
MIME::Lite and Email::Valid to send data/attachments around.

Feel free to adapt it to suit your needs:

http://www.modperlcookbook.org/code/ch15/Cookbook/Mail.pm

Regards

On Mon, Jul 22, 2002 at 10:48:52AM -0700, Goehring, Chuck Mr., RCI - San Diego wrote:
 Richard,
 
 I also use MIME::Lite (on Win2000) with mod_perl.  Found it to be quite reliable and 
it supports attachments and receipts like so:
 
   if($aReceipt ne '') {  # If return receipt requested.
 $msg-add(Disposition-Notification-To= $aApobj-getEmail_Address);  
   }
 
 Chuck
 
 -Original Message-
 From: Richard Clarke [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, July 20, 2002 6:28 AM
 To: [EMAIL PROTECTED]
 Subject: Mail::Sender  modperl.
 
 
 List,
 Have any of you had any problems using Mail::Sender from within 
 mod_perl. My script seems to just sit there waiting for $sender-Open to 
 do anything. I will email the author also but imagined he *might* not be 
 familiar with mod_perl so won't be able to offer any suggestions. 
 Anyone? I looked through the archives but saw no reference to a problem 
 like this. Some people indicated much success with Mail::Sender (not so 
 for me however!).
 
 Second, the recommended solution for sending mails is to instead put 
 them on a queue for an external daemon to handle. My question is, is 
 there a standard implementation people use when doing this. Is the KISS 
 theory invoked and the outoing mail simply written to some plain text 
 spool file or do people use something more involved like writing the 
 to,cc,from,subject,body test to a database and storing any temporary 
 files (attachment) in a directory for later encoding?
 
 Ric
 
 p.s. here is an excerpt from my apache log indicating precisely what happens
 
   220 mail.likewhoa.com ESMTP Postfix
 421 Error: timeout exceeded
  ehlo localhost
  mail from: [EMAIL PROTECTED]
  rcpt to: [EMAIL PROTECTED]
  data
  To: [EMAIL PROTECTED]
  From: [EMAIL PROTECTED]
  X-Mailer: Perl script null
   using Mail::Sender 0.7.14.1 by Jenda Krynicky
   running on localhost (127.0.0.1)
   under account root
  Date: Sat, 20 Jul 2002 13:18:12 -
  Message-ID: [EMAIL PROTECTED]
  Subject:  msg msg msg
 
 close sender
 
  .
  quit
 done
 The request took 305.710375070572 seconds

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: Help with apache::sandwich

2002-06-13 Thread Paul de Repentigny

Éric,

Try:

Directory /web/httpd/htdocs/elterry
... snip ...
/Directory 

instead. Location is used for URIs, not directories.

An alternative would be:

Location /elterry
... snip ...
/Location 

if DocumentRoot is set to /web/httpd/htdocs for Apache.

Paul

Eric Terry écrivit:

 I have the following added to my httpd.conf file:
 
 # (Apache::Sandwich)
 # Add directory custom header
 Location /web/httpd/htdocs/elterry
 SetHandlerperl-script
 PerlHandler   Apache::Sandwich
 PerlSetVar HEADER /my_header.html
 /Location
 
 Here are my html files:
 
 my_header.html:
 html
 head
 titleSystem Wide/title
 /head
 body
 p /I am the header.
 
 Index.html:
 hr
 p /This is just a thought.
 p /But something should be above me.
 /body
 /html
 The header doesn't show up when I go to the index page. What's up?
 
 Eric 
 





Paul de Repentigny
Directeur Développement Logiciel /
Director Software Development
Graph Architecture Inc.
C/C++/Perl/mod_perl/Linux/PHP/MySQL/Lingo/BasicScript/WUP/Etc.
tel:  (418) 659-5611
email: [EMAIL PROTECTED]
web: http://www.grapharchitecture.com/

If you're not part of the solution, start another problem!






RE: Perl_Tstack_sp_ptr

2002-06-11 Thread Paul G. Weiss

I should also mention -- my perl is patched with the patch
to DynaLoader.pm that Doug MacEachern posted in this list.

-P

 -Original Message-
 From: Stas Bekman [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 11, 2002 4:06 AM
 To: Paul G. Weiss
 Cc: [EMAIL PROTECTED]
 Subject: Re: Perl_Tstack_sp_ptr
 
 
 Paul G. Weiss wrote:
  Sorry if this has been covered - I searched to no avail.
  
  I'm getting the following error when trying to start
  an Apache 2.0.36 with ModPerl::Registry:
  
  /usr/libexec/ld-elf.so.1:
  
 /usr/lib/perl5/site_perl/5.6.1/i386-freebsd-thread-multi/auto/
 Apache/Request
  Rec/RequestRec.so: Undefined symbol Perl_Tstack_sp_ptr
  
  All relevant build info is below.  Has anyone seen and 
 conquered this?
 
 Confirmed, I've a similar problem on linux with 5.6.1
 
 /home/stas/httpd/prefork/bin/httpd: relocation error: 
 /home/stas/apache.org/mp-5.6.1-prefork/ModPerl-Registry/t/../.
./blib/arch/Apache2/auto/Apache/RequestIO/RequestIO.so: 
 undefined symbol: Perl_sv_2pv
 
 it happens when I run the test suite in:
 
 ModPerl-Registry:
 
 and I've traced it down to:
 print exists $ENV{QUERY_STRING}  $ENV{QUERY_STRING};
 
 Though I don't understand why there is relocation error, the 
 libperl.so
 lib includes the symbol:
 nm 
 /home/stas/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-mult
 i/CORE/libperl.so 
 | grep Perl_sv_2pv
 0009ae10 T Perl_sv_2pv
 
 and mod_perl is linked against it:
 ldd src/modules/perl/mod_perl.so
   libperl.so = 
 /home/stas/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-mult
 i/CORE/libperl.so 
 (0x40023000)
 
 
 __
 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: Perl_Tstack_sp_ptr

2002-06-11 Thread Paul G. Weiss

OK, until I can decide whether to take a chance on FreeBSD-current 
or to convince my employers who were so enamored of FreeBSD that
we should rebuild the server with Linux, I'm going prefork.

It still doesn't work precisely as it should though.  I decided
to go with the cvs builds of apache and mod_perl.  I have to 
confess that the installation instructions seem strange (both for
CVS and non-CVS).  You have to build and install Apache in order
to get the include files to build mod_perl.  Then after doing 
a make for mod_perl you are supposed to go back to Apache and
configure, make, make-install -- even though the mod_perl make
touched nothing in the Apache tree!  I assume after all of this
you do make install on both Apache and mod_perl although the
doc doesn't say so.

Even after all of that I *still* get the Perl_Tstack_sp_ptr
error!  Putting in the explicit LoadFile for libperl.so gets
rid of that problem, only to create another:

Cannot load /usr/lib/perl5/5.6.1/i386-freebsd-thread-multi/CORE/libperl.so
into server: /usr/lib/perl5/5.6.1/i386-freebsd-thread-multi/CORE/libperl.so:
Undefined symbol pthread_getspecific

Presumably this is because the Perl I used had thread support.  
My workaround is to edit apachectl to preload libc_r.so:

start|stop|restart|graceful)
LD_PRELOAD=libc_r.so $HTTPD -k $ARGV
ERROR=$?
;;
startssl|sslstart|start-SSL)
LD_PRELOAD=libc_r.so $HTTPD -k start -DSSL
ERROR=$?

and finally everything appears to be working.

I suppose I could have done --enable-threads in Apache 
with --with-mpm=prefork and it might have worked.  Is
that considered kosher?  Anyway this seems good enough
for now.

-P


 -Original Message-
 From: Paul G. Weiss 
 Sent: Tuesday, June 11, 2002 1:22 PM
 To: 'Doug MacEachern'
 Cc: [EMAIL PROTECTED]
 Subject: RE: Perl_Tstack_sp_ptr 
 
 
 I suspect that pre-fork would work too, but I'm desparately 
 trying to get threads working.
 
 Here is apr.h
 
 [/usr/local/apache2/htdocs/perl]# grep -i thread 
 /usr/local/apache2/include/apr.h
 #define APR_HAVE_PTHREAD_H   1
 #define APR_USE_PROC_PTHREAD_SERIALIZE0
 #define APR_USE_PTHREAD_SERIALIZE 1
 #define APR_HAS_PROC_PTHREAD_SERIALIZE0
 #define APR_HAS_THREADS   1
 #define APR_HAS_XTHREAD_FILES 0
 #define APR_THREAD_FUNC
 /* Does the proc mutex lock threads too */
 
 One more odd thing to report:  I've noticed that I have both
 libc.so and libc_r.so in the mix.  That can't be good, can it?
 
 Here is why I think so:
 
 INSTALLATION
  The current FreeBSD POSIX thread implementation is built 
 in the library
  libc_r which contains both thread-safe libc functions 
 and the thread
  functions.  This library replaces libc for threaded applications.
 
  By default, libc_r is built as part of a 'make world'.  
 To disable the
  build of libc_r you must supply the '-DNOLIBC_R' option 
 to make(1).
 
  A FreeBSD specific option has been added to gcc to make 
 linking threaded
  processes simple.  gcc -pthread links a threaded process 
 against libc_r
  instead of libc.
 
 -P
 
 [/usr/local/apache2/htdocs/perl]# LD_TRACE_LOADED_OBJECTS=1 \
/usr/local/apache2/bin/httpd  
 libaprutil.so.0 = 
 /usr/local/apache2/lib/libaprutil.so.0 (0x280a9000)
 libapr.so.0 = /usr/local/apache2/lib/libapr.so.0 (0x280b9000)
 libm.so.2 = /usr/lib/libm.so.2 (0x280d4000)
 libcrypt.so.2 = /usr/lib/libcrypt.so.2 (0x280f)
 libssl.so.3 = /usr/lib/libssl.so.3 (0x28109000)
 libcrypto.so.3 = /usr/lib/libcrypto.so.3 (0x28136000)
 libexpat.so.1 = /usr/local/apache2/lib/libexpat.so.1 
 (0x281ea000)
 libc_r.so.4 = /usr/lib/libc_r.so.4 (0x28206000)
 libc.so.4 = /usr/lib/libc.so.4 (0x282bb000)
 
 
 [/usr/local/apache2/htdocs/perl]# readelf -dD 
 /usr/local/apache2/lib/libapr.so.0
 
 Dynamic segment at offset 0x1941c contains 17 entries:
   TagType Name/Value
  0x0001 (NEEDED) Shared library: [libc.so.4]
  0x000e (SONAME) Library soname: [libapr.so.0]
  0x000c (INIT)   0x5f08
  0x000d (FINI)   0x18164
  0x0004 (HASH)   0x94
  0x0005 (STRTAB) 0x3494
  0x0006 (SYMTAB) 0x1184
  0x000a (STRSZ)  8540 (bytes)
  0x000b (SYMENT) 16 (bytes)
  0x0003 (PLTGOT) 0x19fc8
  0x0002 (PLTRELSZ)   2072 (bytes)
  0x0014 (PLTREL) REL
  0x0017 (JMPREL) 0x56f0
  0x0011 (REL)0x55f0
  0x0012 (RELSZ)  256 (bytes)
  0x0013 (RELENT) 8 (bytes)
  0x (NULL)   0x0
 
 
 
 
  -Original Message-
  From: Doug MacEachern [mailto:[EMAIL PROTECTED

htaccess, rewrite and redirect help please

2002-06-03 Thread Paul Williams
Title: htaccess, rewrite and redirect help
please


Hi all,

I'm so new to this, please excuse me if i'm off base.

I'm trying to write an htaccess script which will essentially
say If you're from this web page you get rejected, but all
other web page requests go here:

This is what i pieced together:

-
AuthUserFile /dev/null
AuthGroupFile /dev/null
RewriteEngine On
RewriteCond %{HTTP_REFERER}
^http://www.unauthorized_site.com/index.html [NC]
RewriteRule /*
http://www.my_site.com/access/go_away.html [R,L]
Redirect http://www.my_site.com/hello.html
-

Am i on track?

Thanks,

Paul

-- 
==
http://www.StuckMic.com/america -- The American Code
Remembering the attack on America
http://www.StuckMic.com -- MIVA Powered Aviation 
and Air Traffic Control discussion and chat.
http://www.WavSounds.com -- Thousands of
funny wavs, fully searchable.



Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread Paul Lindner

The output from your example looks like UTF-8 data (Atilde; is a
commonly seen UTF-8 escape sequence).  XML::Parser converts all
incoming text into UTF-8.  You will need to convert it back to
iso-8859-1.

My favorite is Text::Iconv

 use Text::Iconv;
 $utf8tolatin1 = Text::Iconv-new(UTF-8, ISO8859-1);

 my $buffer_latin1 = $converter-convert($buffer);


On Tue, May 07, 2002 at 10:51:10AM -0400, John Siracusa wrote:
 I ran into this problem during mod_perl development, and I'm posting it to
 this list hoping that other mod_perl developers have dealt with the same
 thing and have good solutions :)
 
 I've found that strings collected while processing XML using XML::Parser do
 not play nice with the HTML::Entities module.  Here's the sample program
 illustrating the problem:
 
 #!/usr/bin/perl -w
 
 use strict;
 
 use HTML::Entities;
 use XML::Parser;
 
 my $buffer;
 
 my $p = XML::Parser-new(Handlers = { Char  = \xml_char });
 
 my $xml = '?xml version=1.0 encoding=iso-8859-1?test' .
   chr(0xE9) . '/test';
 
 $p-parse($xml);
 
 print encode_entities($buffer), \n;
 
 sub xml_char
 {
   my($expat, $string) = @_;
   
   $buffer .= $string;
 }
 
 The output unfortunately looks like this:
 
 Atilde;copy;
 
 Which makes very little sense, since the correct entity for 0xE9 is:
 
 eacute;
 
 My current work-around is to run the buffer through a (lossy!?) pack/unpack
 cycle:
 
 my $buffer2 = pack(C*, unpack(U*, $buffer));
 print encode_entities($buffer2), \n;
 
 This works and prints:
 
 eacute;
 
 I hope it is not lossy when using iso-8859-1 encoding, but I'm guessing it
 will maul UTF-8 or UTF-16.  This seems like quite an evil hack.
 
 So, what is the Right Thing to do here?  Which module, if any, is at fault?
 Is there some combination of Perl Unicode-related use statements that will
 help me here?  Has anyone else run into this problem?
 
 -John

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread Paul Lindner

On Tue, May 07, 2002 at 11:13:43AM -0400, John Siracusa wrote:
 On 5/7/02 10:58 AM, Paul Lindner wrote:
  The output from your example looks like UTF-8 data (Atilde; is a
  commonly seen UTF-8 escape sequence).  XML::Parser converts all
  incoming text into UTF-8.  You will need to convert it back to
  iso-8859-1.
  
  My favorite is Text::Iconv
  
 use Text::Iconv;
 $utf8tolatin1 = Text::Iconv-new(UTF-8, ISO8859-1);
  
 my $buffer_latin1 = $converter-convert($buffer);
 
 So HTML::Entities only works with ISO8859-1 (or ASCII, presumably)?  What if
 I have actual UTF-8 data?  Won't conversion to ISO8859-1 in service of
 HTML::Entities result in data loss?

Yes, HTML::Entities is based on ISO8859-1 input only.  BTW, for better
performance in mod_perl consider using Apache::Util::escape_html()


 escape_html
   This routine replaces unsafe characters in $string
   with their entity representation.

my $esc = Apache::Util::escape_html($html);


Anyway, back to character entities..

Text::Iconv will fail if you try to convert unconvertable text, so at
least you can test for that condition (and adjust accordingly)

BasisTech sells a comprehensive unicode library called Rosette that
knows how to automatically convert to a target character set while
incorporating SGML entities for any character set.  Perhaps it's time
for an open implementation of that..

Also see http://rf.net/~james/perli18n.html for a perl i18n faq.




-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: SOAP and web services

2002-05-02 Thread Paul Lindner

On Thu, May 02, 2002 at 01:27:48PM -0500, Joe Breeden wrote:
 Bart,
 
 I would have to recommend SOAD::Lite ( http://www.soaplite.org) also. We use it 
accomplish many tasks - not the least of which is exposing Perl data structures to M$ 
ASP applications - which have a moderate load and have had no problems. 
 


A few more examples can be found in chapter 15 of the mod_perl
cookbook.  The (fairly simple) code in HalfLife-QueryServer is here:

  http://www.modperlcookbook.org/code/ch15/

Another simple way to do RPC over HTTP with mod_perl is RPC::XML.
Both it and SOAP::Lite are testaments to the power and simplicity of
perl+apache..

  -Original Message-
  From: Bart Frackiewicz [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 02, 2002 12:34 PM
  To: [EMAIL PROTECTED]
  Subject: SOAP and web services
  
  
  Dear List,
  
  i want to create a server in mod_perl/apache, which receives 
  request via get/post (plain), process this request (with 
  database access and some functions) and answers in xml (with 
  correct header), after planning this about a month i realized 
  that this is called a web service.
  
  the difference between my solution and all articles was SOAP, 
  which i understand as an extension to http, so in my opinion 
  i need something that allows to parse the request and creates 
  the output, is there a solution for mod_perl anyway? and is 
  this solution stable for a production server which more than 
  10.000 request/day?
  
  i hope this is the right place to ask, but in all articles i 
  read there were only examples for java/tomcat, not for perl/mod_perl.
  
  Thanks in advance
  
  Bart Frackiewicz
  
  
  -- 
  BART FRACKIEWICZ
  systementwickler
  inity - agentur fuer neue medien gmbh 
  birkenstrasse 71  
  40233 duesseldorf
  

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Help needed tracking down 'Callback called exit' problem

2002-04-29 Thread Paul Dlug

I have a problem I can't seem to track down, showing up in our logs is:
Out of memory!
Callback called exit.

Typically there are two or three of these right after one another.
Depending on server load they show up every 15min. to an hour.

I followed the guidelines for allocating an emergency memory pool in the
guide and using Apache::Debug but I wasn't able to get any information
out of it. The biggest problem is that I cannot seem to reproduce the
error. I parsed the URL's out of the access log and ran all of the
requests against our staging server, the error never appeared.

Webservers are behind a load balancer, running Apache 1.3.23/mod_proxy
proxying requests to mod_perl (Apache 1.3.23/mod_perl 1.26) server
running on the localhost.

This is all running on FreeBSD 4.5-STABLE. There's plenty of free
memory, I also turned on process accounting and never saw a mod_perl
httpd grow above 31mb. The load average on the boxes never gets above
0.05.

Is there anyway to have the parent apache process log all
creations/exits of the children? This way I could setup an access log
with the PID of each child and then trace back all requests served after
it's death.

Any help greatly appreciated.



Re: XML::RPC

2002-04-21 Thread Paul Lindner

On Sat, Apr 20, 2002 at 11:49:24PM -0400, Eric Frazier wrote:
 Hi,
 
 I am finally finding yes, there could be a reason for me to use this, I want
 to avoid SOAP, partly because of the license crap(fear), but also because I
 figure that XMLRPC will be easier to learn at first and likely will fit my
 small needs. But as I look at examples and various tools that support
 working with Perl they often are of a nature of a CGI and a standalone
 client. My needs aren't that small :)  The only Apache modules I have found
 are with the SOAP::Lite module. 
 
 So what do the you people recommend? I have found several, Frontier::RPC,
 there is a SOAP::Lite XML::RPC module, but it depends on SOAP::Lite which I
 find confusing, there is just RPC::XML on CPAN. Most important though, I of
 course want to run the server with mod_perl which is the only reason I
 consider this post to be somewhat on topic, I really want to use mod_perl
 with this and what group would be better to advise me on that :) 
 
 What I want to be able to do is to expose some simple method calls, along
 with some hash data to a Java client. Say like a parser object from
 HTML::Parser. The client will be Java, but I get the idea that shouldn't
 really matter. Sorry if my terminology is off, I am swimming a bit..

I think you'll find RPC::XML to be a solidly engineered module.  I've
used it as a client and as a server to good effect.  It includes
stand-alone, CGI, and mod_perl based servers and a very nice client.

If all you need is simple RPC calls I find that XML-RPC provides a
much more straightforward environment.  Even with my background in
http based rpc systems it took me a while to pick up on the
idiosyncrasies of SOAP.

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: Apache::DProf seg faulting

2002-04-17 Thread Paul Lindner

On Tue, Apr 16, 2002 at 06:05:11PM -0400, Sam Tregar wrote:
 On Tue, 16 Apr 2002, Sam Tregar wrote:
 
   On 16 Apr 2002, Garth Winter Webb wrote:
  
Sam, try getting rid of the 'PerlModule Apache::DB' line.  I've used
Apache::DProf w/o any problems by including only the one PerlModule
line.  Since they both want to use perl debugging hooks, I'm guessing
that Apache::DProf is getting crashed up when it tries to use hooks
already grabbed by Apache::DB...
  
   Same result.  Thanks though!
 
 Aw nuts, that was the problem!  I thought I'd tried that already, but I
 guess not.  I actually got those PerlModule lines from the mod_perl
 Developers Cookbook - guess this is an errata!

I think that this may be a problem with the use of Perl sections.

I believe your original post had something like this:

Perl
  use Apache::DProf
  use Apache::DB
  Apache::DB-init();
/Perl

Geoffrey and I tested our environments today and the recipe given in
the book seems to work just fine:

  PerlModule Apache::DB
  PerlModule Apache::DProf


-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



htaccess

2002-04-14 Thread Paul Williams
Title: htaccess


Hi All,

I'm new at this and i'm trying to write my own custom htaccess
file.

Here is what i have written so far:

-
AuthUserFile /dev/null
AuthGroupFile /dev/null
RewriteEngine On
RewriteCond %{HTTP_REFERER}
!^http://www.myserver.com [NC]
RewriteCond %{HTTP_REFERER}
!^http://myserver.com [NC]
RewriteRule /*
http://www.myserver.com/error.mv [R,L]
-

My question is, instead of a RewriteRule that returns a page, how do i
write it so it returns either A) nothing or, B) some text like
Not Found?

Paul Williams

-- 
==
http://www.StuckMic.com/america -- The American Code
Remembering the attack on America
http://www.StuckMic.com -- MIVA Powered Aviation 
and Air Traffic Control discussion and chat.
http://www.WavSounds.com -- Thousands of
funny wavs, fully searchable.



Help us make the mod_perl Developer's Cookbook better.

2002-04-09 Thread Paul Lindner

Hi there.

First of all, thanks to all of those who are now using the mod_perl
Developer's Cookbook.  We hope that it's made your development easier
and more fun.  Due to the continued popularity of the book, a 2nd
printing is being planned in the next week or so.  This is nice
because we're allowed to correct minor errors.

We'd appreciate your help in fixing any errors in the text or code.
No-one's perfect (especially us, look at our errata page!), so if
you've noticed anything amiss that's not listed at:

  http://www.modperlcookbook.org/errata.shtml

please send it to

  [EMAIL PROTECTED] 

asap.

Thanks again!

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: [OT?] What exactly is forwarding?

2002-03-12 Thread Paul Lindner

On Tue, Mar 12, 2002 at 10:01:42AM +0100, Martin Haase-Thomas wrote:
 Hi all,
 
 I know this is not perfectly the right list for my topic, but before 
 subscribing to another for just one question... forgive me if I'm going 
 to be boring. Even more, because my question is rather philosophical.
 
 If you consider JSPs, there is a tag called jsp:forward page=... /. 
 My question is: how do I have to understand 'forward'? The java 
 documentation isn't that verbose, and I can imagine two possible meanings:
 1. Forwarding is some sort of an internal redirect to the servlet engine 
 which the browser will not be informed of.  From this point of view 
 forwarding will be nearly the same as a dynamic include.

*ding* correct!  Basically it says, dump any buffered output and start
a new request.

 2. Forwarding is the same as a redirect.

nope, see above.

 Maybe a superfluous question for some of you, for me it isn't actually. 
 So, if anyone knows an answer - or knows the number of the RFC I'll find 
 the information: you're welcome!

You'll find that $r-internal_redirect() is the mod_perl equivalent.
Also Apache::ASP containts the Transfer() method which accomplishes
the same thing.

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: BerkeleyDB Problems

2002-03-12 Thread Paul Lindner

On Tue, Mar 12, 2002 at 11:06:00AM -0500, Mark Matthews wrote:
 Hello,
 
 I am moving a website that now resides on a i686 server running RedHat
 6.2 with perl v5.005_03 to another i686 server running Suse 7.1 with
 perl v5.6.1.

 The website uses a number of cgi scripts that read and write from
 BerkeleyDB files using the tie function.
 
 The site is currently running fine on the RedHat server, but when
 testing the scripts on the Suse box I am finding the the scripts are
 failing complaining that the db file cannot be opened.

 The function calling the script is as follows...
 $db = blurb;
 tie(%BLURB, DB_File, $db, O_RDONLY, 0664) || die(Error: could not
 open $db: $!\n);
 
 Things I have tried so far..
 - I have checked that the BerkeleyDB file (blurb) in the right path, and
 is readable/writable.
 - I have checked  that the DB file is not corrupt by ftping it back to
 the RedHat box and testing it.. Works fine..
 - the command file blurb shows that the db file is Berkeley DB (Hash,
 version 5, native byte-order) and my guess is the version of DB_File
 cannot read that DB version.   I have installed earlier versions of
 DB_File on the Suse box with no luck.
 - I have successfully created a new db file using tie. The file created
 is version 7.
 
 Since these scripts do infact work on the RedHat server, what do I need
 to do to get them to work on the Suse server

DB_File is usually implemented on top of whatever the latest Berkeley
DB is available.  The file formats are usually not compatible from
major version to another major version.  I believe RH 6.2 uses bdb v2
and Suse uses a newer version 3 or 3.1.  Use the rpm -q -a command to
find out which versions are which.

Anyway, you need to try out the db_upgrade command, it should upgrade
the db file to the latest format.  It might not be installed by
default, so check your local docs.  (I think it's in db3-utils, or
some such..)

You might also try out the BerkeleyDB module for access to more
interesting features provided by the later versions of this library.
In particular the transactions subsystem is very, very cool.

Good Luck

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: performance testing - emulating real world use

2002-03-12 Thread Paul Lindner

On Tue, Mar 12, 2002 at 01:52:36PM -0800, clayton cottingham wrote:
 Bryan Henry wrote:
  
  Anyone know of good guides or general info on
  performance testing and emulating real use of
  an application.
  
  I would like to understand how to identify
  potential bottlenecks before I deploy web apps.
  
  thank you,
  ~ b r y a n

I've used HTTPD::Bench::ApacheBench (available on CPAN) to do load
testing.  It seems to do a good job.  The hardest part is writing the
testing script  (especially for form transactions..).  

However, if you can do your requests with LWP it's fairly
straightforward to convert over to the ApacheBench data structures.

I'm considering writing a little mod_perl proxy server that records
the different transactions.  Then I could just munge the separate
Authorization: headers to do some serious load testing...

 
 try httpd.apache.org/test/
 
 and perl framework
 there in
 
 as well look on freshmeat for
 
 siege
 it does testing too

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: Breaks in mod_perl, works in Perl

2002-03-06 Thread Paul Lindner

On Wed, Mar 06, 2002 at 11:27:28AM -0700, Mark Hazen wrote:
 Mark Hazen wrote:
  I wish this were true, but no one will ever get IO::Scalar to catch DBI's
  STDERR output.
 
 If so, it's only because STDERR under mod_perl is already tied.  DBI is
 not an external process.
 
  Throwing all this stuff into a file is already something DBI
  can do, but as I already said, opening several hundred files per minute
 will
  overwhelm my system.
 
 I don't think it does that.  It should open one file per process that
 has tracing turned on and keep writing to it.  I already suggested that
 you can just turn it on for a single process.  That would mean one file
 being written to by one process, which is very unlikely to overwhelm any
 system.
 
 That's your opinion.  In my opinion, a bunch of disk IO and file seeks are a
 waste of resources.  The bigger issue here is that it is better to store in
 memory, and it saddens me that it doesn't seem possible.

This is a design flaw of DBI then.  You might get more results if you
post on the DBI users list.  We got part of the way there by
redefining the trace_msg function, the only part that remains is
gathering the output of the lower-level DBD calls, that might involve
modifying some XS code, (or it might not)..

Propose a 'callback' interface on dbi-users, you'll probably get a
warm reception.

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: Breaks in mod_perl, works in Perl

2002-03-05 Thread Paul Lindner
;
*croak = \Carp::croak;
goto croak;
 }
 
 1;
 __END__
 perl -MIO::Capture
$x = IO::Capture-new(\*STDERR);
print now capturing\n;
warn qq[captured ok\n];
print captured text 'captured ok' shouldn't have appeard\n;
$y = $x-capture;
print capture didn't block\n;
print $y;
warn Restored ok\n;
 __END__
 now capturing
 captured text 'captured ok' shouldn't have appeard
 capture didn't block
 captured ok
 Restored ok
 
 perl -MIO::Capture
$x = IO::Capture-new(\*STDERR);
print now capturing\n;
system(q[perl -e print STDERR qq[captured ok\n]]);
print captured text 'captured ok' shouldn't have appeard\n;
$y = $x-capture;
print capture didn't block\n;
print $y;
warn Restored ok\n;
 __END__
 now capturing
 captured text 'captured ok' shouldn't have appeard
 capture didn't block
 captured ok
 Restored ok

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: here is a good modperl question on perlmonk

2002-03-05 Thread Paul Lindner

On Tue, Mar 05, 2002 at 04:53:56PM -0600, Dave Rolsky wrote:
 On Tue, 5 Mar 2002, Medi Montaseri wrote:
 
  My suggestion would be to install a Linux on your developer's PC and
  keep with the distributed model. Now everyone can use a common web tree
  and at integeration, bring all of them to a staging box, QC it and ship
  it to production.
 
 Giving everyone their own Apache daemon, which uses their checked out tree
 of code, on a central dev server is really not a problem either.

One other tip... write a small script (or modify apachectl) to start
apache with a port number matched to your unix UID.  This keeps
developers from using clashing port numbers.

  httpd -c Port $UID -c Listen $UID

etc..

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: Formatted Printing

2002-02-26 Thread Paul Lindner

On Tue, Feb 26, 2002 at 07:12:55PM -0800, Rasoul Hajikhani wrote:
 Hello folks,
 I have just writen an online ordering system for our company using
 mod_perl. The user must also be able to print the form, preserving the
 format. Since we use netscape (4.5) for Irix 6.5, I can't use the print
 button of the browser, the format is not preserved. Any one know of any
 modules/suggestions on this?

One simple thing is to create a PDF file for the printable format.
Make sure you save it in ascii format, and put simple substitution
strings for each field.  Then just search, replace, and output to the
browser.

There are also PDF modules on CPAN if you're not into templates...

If fancy printing is not your thing, or you want full cross-platform
compatibility consider text/plain output..  You can even send that to
that 20 year old daisy wheel printer..

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



[PATCH] mod_perl 1.26 port to POSIX 1003.1-2001 hosts

2002-02-24 Thread Paul Eggert

The new POSIX standard is now official (IEEE Std 1003.1-2001), and it
has removed support for some obsolete utility options that modperl
uses.  Basically, the new POSIX has removed digit-string options
(e.g., tail -1) and options beginning with + (e.g., sort +1).
I'm using an experimental environment that insists on the new
standard, so I tend to run into these problems before other people do.

Here is a proposed patch to mod_perl.

2002-02-22  Paul Eggert  [EMAIL PROTECTED]

Port to POSIX 1003.1-2001 hosts, where tail -1 doesn't work.

* apaci/libperl.module, apaci/mod_perl.config.sh:
tail -1 - sed -n '$p'

===
RCS file: apaci/libperl.module,v
retrieving revision 1.26
retrieving revision 1.26.0.1
diff -pu -r1.26 -r1.26.0.1
--- apaci/libperl.module1999/08/04 01:00:11 1.26
+++ apaci/libperl.module2002/02/23 07:55:07 1.26.0.1
@@ -47,7 +47,7 @@ ConfigStart
 echo $my_prefix adjusting Apache build environment
 CFLAGS=$CFLAGS -DMOD_PERL
 if [ .$my_buildtype = .OBJ ]; then
-my_perl_libs=`egrep '^PERL_LIBS=' $my_outfile | tail -1 | cut -d= -f2-`
+my_perl_libs=`egrep '^PERL_LIBS=' $my_outfile | sed -n '$p' | cut -d= -f2-`
 LIBS=$LIBS $my_perl_libs
 fi
 
@@ -61,9 +61,9 @@ ConfigStart
 echo 
 else
 echo $my_prefix enabling Perl support for SSI (mod_include)
-my_perl_ccflags=`egrep '^PERL_CCFLAGS=' $my_outfile | tail -1 | cut -d= 
-f2-`
+my_perl_ccflags=`egrep '^PERL_CCFLAGS=' $my_outfile | sed -n '$p' | cut 
+-d= -f2-`
 CFLAGS=$CFLAGS -DUSE_PERL_SSI $my_perl_ccflags
-my_perl_inc=`egrep '^PERL_INC=' $my_outfile | tail -1 | cut -d= -f2-`
+my_perl_inc=`egrep '^PERL_INC=' $my_outfile | sed -n '$p' | cut -d= 
+-f2-`
 INCLUDES=$INCLUDES -I\$(SRCDIR) -I$my_perl_inc
 if [ .`egrep '^PERL_THREADS[  ]*=[]*yes' $my_config` != . ]; 
then
 echo $my_prefix enabling Perl Thread support
===
RCS file: apaci/mod_perl.config.sh,v
retrieving revision 1.26
retrieving revision 1.26.0.1
diff -pu -r1.26 -r1.26.0.1
--- apaci/mod_perl.config.sh2001/07/06 19:41:03 1.26
+++ apaci/mod_perl.config.sh2002/02/23 07:55:07 1.26.0.1
@@ -52,7 +52,7 @@ fi
 vars=`egrep '^[A-Z0-9_]*[ ]*=' $tmpfile1 | sed -e 's:^\([A-Z0-9_]*\).*:\1:'`
 OIFS=$IFS IFS=$DIFS
 for var in $vars; do
-egrep ^${var}[]*= $tmpfile1 | tail -1 $tmpfile2
+egrep ^${var}[]*= $tmpfile1 | sed -n '$p' $tmpfile2
 val=`sed -e 's:^[A-Z0-9_]*[   ]*=[]*::' $tmpfile2`
 eval param_${var}=\${val}\
 done



Re: Frontier::Responder question

2002-02-18 Thread Paul Lindner

On Mon, Feb 18, 2002 at 10:25:59AM -0500, Robert Landrum wrote:
 I recently picked up Programming web services with XML-RPC.  It 
 mentions a module that I have yet to track down.  I am unable to find 
 Frontier::Responder.  O'Reilly's site mentions that Joe Johnston 
 wrote.  Joe makes it pretty clear that he want's you to use it in 
 place of Frontier::Daemon when writing mod_perl handlers, but never 
 gives an address of where to find it, or how to contact him for it.
 
 The Frontier modules seem to be a little old.  Are there any other 
 newer versions that I should be using instead.  The Frontier::RPC 
 package was last modified in 1999.

Check out RPC::XML.  It is very well implemented, and includes
Net::Server/HTTP::Daemon based server code, and a full client
implementation.  Highly recommended..

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: mod_perl cookbook ... next steps

2002-02-18 Thread Paul Lindner

On Thu, Feb 21, 2002 at 01:17:02AM +0200, Issac Goldstand wrote:
 [EMAIL PROTECTED] wrote:
 [snip]
 
 As I need information between the stage of life, I would use $r-notes to
 communicate down the cycle. But then again, if I have some data tied
 to the session (I use Apache::Session), how can I give it to
 the PerlHandler. Is $r-notes proofed for any export, object or blessing
 behavior?
 
 I think $r-pnotes should work fine with this...  But I'm not positive...
 Other than that, it sounds fine...  Except that usually youll 
 authenticate the user in PerlAuthenHandler and use AuthzHandler to 
 decide whether or not to let him do whatever he's trying to do... The 
 Eagle book had some nice explanations of this...

If you have complex data structures pnotes() is definitely the way to
go..  Highly recommended.

Another alternative is to use package globals.  Just make sure that
your PerlInitHandler and PerlCleanupHandler re-initializes them before
every request..

Note: I have not compared the speed differences between these two
approaches.  I would assume the latter would be a little faster.  Of
course it will make your code non-thread-safe, so it's not so good for
potential mod_perl 2.0 compatibility..

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: [BUG] Memory Courruption (was: RE: [Q] SIGSEGV After fork())

2002-02-15 Thread Paul Lindner

On Fri, Feb 15, 2002 at 11:44:03AM -0600, Fister, Mark wrote:
 
  Dear mod_perl experts:
  
  Collectively, we've been at this for more than two weeks and have searched
  various mod_perl archives, all to no avail.
  
  Symptom:
  ===
  SIGSEGV after fork().  Very reproducible.  Memory corruption gets moved
  around if the codebase changes.
 
 [ SNIP ]
 
 The above is the key: moved around.  Therefore, I need Purify or similar
 tool.  I'm going to have to go this route, since nobody has any ideas.
 Go go gadget purchasing! :(
 
 The only other way I can think of to solve this is to send my module list
 to this audience.  Please find it, attached, with home-grown modules
 deleted.

To further diagnose this problem you might consider using the sigtrap
module and paying careful attention to your logs...  This at least led
me to the portion of my perl that was causing the problem.

A simple

  use sigtrap;

The default signal handler used in this module gives you a stack trace
before the core dump..


-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: inheritance and Apache::Request

2002-02-14 Thread Paul Lindner

On Thu, Feb 14, 2002 at 01:55:34PM -0600, Alex Porras wrote:

 Ok, that makes sense.  But the reason I didn't include a new
method for FooBar was because I don't know what A::R's new method
does, so I didn't want to override it.  What if it does some init
stuff to the object? I'm assuming that's what's happening because,
after adding a new method to FooBar, when I try to call
$foobar-param (which I have not overridden), the child process
segfaults.  Oh well, I guess at this point I need to go back to
reading more on perl OO since it's not sinking.

I believe that Apache::Request doesn't really do inheritence properly.
If you look you'll see that the new() method is written in C.  It
should be blessing itself into the passed in class, not using
Apache::Request.  My XS is a little foggy, but it appears that these
lines should be modified to use the passed in class:

CLEANUP:
apreq_add_magic(ST(0), robj, RETVAL);

which ends up as:

ST(0) = sv_newmortal();
sv_setref_pv(ST(0), Apache::Request, (void*)RETVAL);


In any case all you need to do to get around this is define your own
new method and call the Apache::Request object directly and store it
as the value 'r'..  Here's an example:

sub new {
 my ($class, $r) = @_;

 return bless { r  = Apache::Request-new($r),
   }, $class;
}





 Thanks for your help!
 
 --Alex
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  
  The problem is that package FooBar doesn't have a new 
  method. Here's what happened as a result.
  
  When you called 'FooBar-new($r), perl looked for a sub 
  called new in package
  FooBar. Since it didn't find one, it looked at FooBar's @ISA, 
  and looked in
  Apache::Request for a new method. There it presumably found 
  one, so that
  statement didn't return an error. But, the new() in 
  Apache::Request probably
  returned an Apache::Request object instead of a FooBar 
  object, so when you
  called $form-fooey, it only looked in Apache::Request and 
  any modules in it's
  @ISA.
  
  You might want to look at using the universal isa and can 
  methods while
  you're debugging and trying stuff out. Good luck!
  
  Wes Sheldahl

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: About PerlLogHandler phase

2002-02-11 Thread Paul Lindner

On Mon, Feb 11, 2002 at 06:31:25PM -0800, Randy J. Ray wrote:

 * If I install a handler for PerlLogHandler, does the normal logging still
   take place? Is it a function of whether my handler returns OK, DECLINED,
   etc.?

As far as I know return codes are ignored.  This means that all
logging (and cleanup) handlers are called for each request.

 * Are there ways to register other log types, in addition to the access,
   error, etc.? Such that people could specify those (and a format) the
   same way they specify the others? More to the point, so that there
   might be a ready file-descriptor I could print to, rather than having to
   deal with the open/lock/write/unlock/close cycle.

Apache::LogFile (section 16.2) is what you are looking for.  It gives
you a global filehandle that you can print to as much as you care to.

 To explain, I am looking at ways to expand the logging capability in my
 Apache::RPC::Server class. I'd like at the very least to be able to alter the
 URI part such that it reflects the procedure name that was called (this I
 understand how to do). Ideally, I'd like to either write completely different
 lines out to the access log, or (preferable) write to a separate log entirely,
 so that tracking usage statistics is made that much easier. If I go the
 separate log route, I don't want the server to be weighted down by the
 repetitive open/close cycle on the files.

You might also want to consider setting a notes value for each piece
of information you want to log.  This is detailed in section 16.4 of
the cookbook.  It's dead simple, just add this to your httpd.conf:

LogFormat %{RPC_NAME}n %{RPC_ARGS}n %{RPC_RESULTS}n rpc_log_format

Location /RPCSERV
 CustomLog logs/rpc_log rpc_log_format
/Location

and then somewhere in your code do this:

 $r-notes('RPC_NAME', $cow);
 $r-notes('RPC_ARGS', $moo);
 $r-notes('RPC_RESULTS', $milk);


-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: [Straying from the Topic] Installing from scratch Apache + mod_perl + Apache::ASP (+maybe others) on unix

2002-02-06 Thread Paul Lindner

Two things,

First check out http://www.apachetoolbox.com/ About as out-of-the-box
as you can get.  Last time I tried it seemed to 'do the right thing'
for me.

For mod_perl specifics you might also check out chapter 1 of the
mod_perl Developer's Cookbook.  I think it's a pretty good stab at
showing a novice how to compile and install apache+mod_perl (though
not mod_ssl... alas) The complete chapter is online at
http://www.modperlcookbook.org/


Regards,
Paul


On Thu, Feb 07, 2002 at 12:04:19AM +, Ged Haywood wrote:
 Hi there,
 
 On Thu, 7 Feb 2002, Rod Butcher wrote:
 
 
  professionals are being driven mad, despite reading the Guide (which despite
  being complete is still mysterious, it comes across as having a mission
  statement to contain everything rather than to be useful, sorry). 
 
 Patches, chapters, help are always welcome I'm sure.
 
  My .05 is that all development be stopped until the instal process
  is up to the same standard as M$. This is what made M$ rich, the
  sheer installability and usability. I was visiting somebody
  yesterday and he had Win2K installing while we talked for an hour.
 
 Yeah, I had a car like that once, but I got rid of it.
 
 When I installed the operating system on a Mac last year it took
 about three minutes - including all the tools, browsers and wotnot
 that you could wish for - with no intervention from me at all.
 After the pain I've been through with some W1nd0ze installations
 it was very refreshing.  So I guess what I'm saying is that there's
 a lot more to it than that, or Apple would be ruling the world.
 
 73,
 Ged.

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: modifying apache config at runtime

2002-02-04 Thread Paul Lindner

On Mon, Feb 04, 2002 at 04:47:27PM -0500, Peter Beardsley wrote:
 Is is possible to modify the in-memory apache configuration at 
 runtime?  I've seen modules that allow you to parse and modify the 
 httpd.conf file, but that's not really what I'm looking for.  In particular 
 I want to set the value of ErrorDocument.

If all you want to do is that you can just use the custom_response
method.  Here are a couple of examples...

  # on bad requests, redirect to some documentation
  $r-custom_response(BAD_REQUEST,
 http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html;);

  # but on unauthorized requests, send to a local file
  $r-custom_response(FORBIDDEN, /landlubber.html);


You'll have to do this for every request, because you're cannot change
the global config, only the child's localized configuration..

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: modperl growth

2002-02-03 Thread Paul DuBois

At 11:02 + 2/3/02, Dave Hodgkinson wrote:
Paul DuBois [EMAIL PROTECTED] writes:

  Mac OS X includes Apache, and mod_perl works there, too.  That's
  another group of potential new mod_perl-ized servers.

I think all the recent RedHats come with mod_perl as a DSO by default.

I just looked on a RH 7.2 machine.  It has the AddModule line in the
default httpd.conf, but no mod_perl.so in the modules directory.



Re: [OT] Re: mod_perl Developer's Cookbook (and Amazon)

2002-02-02 Thread Paul Lindner

On Sat, Feb 02, 2002 at 10:03:09AM -0600, Mike808 wrote:
  Joe Brenner wrote:
   Spend only $4 more, and you too can show your disgust for
   software patents.
 
 Worth every penny.

I'm against frivolous patents myself.  It harms the industry and could
even be detrimental to mod_perl or Apache if either is found to
infringe upon such a patent.

However, please read the following articles before you boycott.  The
first is an open letter from Jeff Bezos, the second is a fairly
lengthy article on the subject by Tim O'Reilly.

   http://www.amazon.com/exec/obidos/subst/misc/patents.html
   http://www.oreilly.com/ask_tim/patent_reform_0300.html


 And AllBookstores.com is now offering it at the same price as Amazon.
 So now it doesn't cost me anything to show my disgust for software and
 business model patents. As for the Amazon kickback, well, you have a 
 sucky publisher for not giving you more of your directly generated sales.

Well, sometimes you have to take what you can get...  Please note that
it did take some convincing to get this thing published.  No one
seemed to believe that there is a market for mod_perl books.

I am hoping that this book is a success.  Not only for the obvious
altruistic reasons, but also for mod_perl itself.  It's sometimes
depressing going into a bookstore to find shelf-upon-shelf of Java-web
books -- against a puny outcrop of mod_perl related tomes...

So, to reiterate.  Buy your copy whichever way suits you best.  Amazon
or not.  In either case a big THANK YOU to all...  We wouldn't even be
having this discussion if it wasn't for this wonderful community.

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: modperl growth

2002-02-02 Thread Paul DuBois

At 20:54 -0200 2/2/02, Jorge Godoy wrote:
Matt Sergeant [EMAIL PROTECTED] writes:

  Wow, bizarre. Not sure why but the AxKit list has seen a massive spurt in
  traffic lately too. Perhaps due to the migration to xml.apache.org (well,
  just a link at the moment), but perhaps due to the above?

  However I'm always skeptical of such massive changes - perhaps more likely
  is a change in SecuritySpace's methodology?

You have to remember of the latest attacks on IIS too... People are
migrating from IIS to other web servers. Apache is a very good
candidate to power these ex-IIS sites.

Since the use of Apache has increased, people start looking after
alternative technologies that use it. mod_perl, AxKit and other are
these technologies.


I don't think that this covers all those new servers, but it certainly
covers a lot of them.

Mac OS X includes Apache, and mod_perl works there, too.  That's
another group of potential new mod_perl-ized servers.




Re: New mod_perl Logo

2002-01-31 Thread Paul Cotter


   mod_perl is a lousy name.

It is causing me a problem. My potential customers have heard of Perl and
Apache, MySql and Postgres, but they dot like the idea of perl modifying the
Apache processing. It strikes them as tinkering round with the internals and
liable to cause problems 'when we upgrade' or 'move to another platform'. It
also does not look good on a resume when you are sending it to someone who
has never heard of it. You are never quite sure whether to Wordcap it or
not. Give it some other marketting name, even if it keeps its original name
in places like this. Anything will do, WebBlast, Insiouxiance, Perlandra,
Exsight, Insite, HowtoSite - I really do not mind.

Regards - Paul Cotter





Re: mod_perl Developer's Cookbook

2002-01-31 Thread Paul Lindner

On Thu, Jan 31, 2002 at 06:18:55PM -0800, Joe Brenner wrote:
 
  ordered my today through the website (puts a little extra money
  in the hands of mod_perlers:
  
  http://www.modperlcookbook.org/
 
 I just ordered mine through fatbrain, myself...

Thanks!


 I won't deal with amazon:  http://www.noamazon.com

I just added a page with direct links for eight other bookstores.
It's now available at http://www.modperlcookbook.org/order.html


 If there's a mod_perl developer's fund I could contribute to
 (like YAS), I'd be glad to send them a check. 

Now you're talking!  I wonder if YAS would consider funding
perl-related projects like mod_perl?  Perhaps if we had a big name
(Ticketmaster?) we could get the ball rolling on such a thing..


-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: slow regex [BENCHMARK]

2002-01-25 Thread Paul Mineiro

Paul Mineiro wrote:


 right.  i probably should've mentioned earlier that CGAT x 5 is 
 really fast in both mod_perl and command line.

 if anybody wants my actual $seq data, please let me know.


i neglected to mention something big:  the production version is 
identical but using perl 5.005 and it
doesn't have this problem.

perl -V of the production perl follows.

thanks,

-- p

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=linux, osvers=2.4.4-xfs, archname=i686-linux
uname='linux rock.codegrok.lab 2.4.4-xfs #8 smp wed may 30 17:37:44 
pdt 2001 i686 unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-O2', gccversion=2.95.4 20010319 (Debian prerelease)
cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldbm -ldb -ldl -lm -lc -lcrypt
libc=, 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):
  Built under linux
  Compiled at Oct 30 2001 10:33:04
  %ENV:

PERL5LIB=/home/codegrok/genegrokker-interface/lib/perl5:/home/codegrok/genegrokker-interface/ext/lib/perl5
  @INC:
/home/codegrok/genegrokker-interface/lib/perl5
/home/codegrok/genegrokker-interface/ext/lib/perl5
/home/codegrok/genegrokker-interface/ext/lib/perl5/5.00503/i686-linux
/home/codegrok/genegrokker-interface/ext/lib/perl5/5.00503

/home/codegrok/genegrokker-interface/ext/lib/perl5/site_perl/5.005/i686-linux
/home/codegrok/genegrokker-interface/ext/lib/perl5/site_perl/5.005
.





Re: slow regex [BENCHMARK]

2002-01-25 Thread Paul Mineiro

Rob Mueller (fastmail) wrote:

I recently had a similar problem. A regex that worked fine in sample code
was a dog in the web-server code. It only happened with really long strings.
I tracked down the problem to this from the 'perlre' manpage.

   WARNING: Once Perl sees that you need one of $, $`, or $'
anywhere in the program, it

snip


What I did in the end was something like this:

In the code somewhere add this so it's run when a request hits.

open(F, '/tmp/modulelist');
print F join(\n, values %INC), \n;
close(F);

This creates a file which lists all the loaded modules. Then after sticking
a request through the browser, do something like:

grep \$\' `cat /tmp/modulelist`
grep \$\ `cat /tmp/modulelist`
grep \$\` `cat /tmp/modulelist`

to try and track down the offending module. 

well, the good (bad?) news is, none of the modules in the module list 
have the expensive regex variables in them.

i've attached the module list, in case it is of interest.

thanks,

-- p



/home/aerives/genegrokker-interface/lib/perl/Keys.pm
/usr/share/perl/5.6.1/Carp.pm
/usr/share/perl/5.6.1/unicode/To/Upper.pl
/home/aerives/genegrokker-interface/lib/perl/PrimerFunctions.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/auto/Storable/autosplit.ix
/home/aerives/genegrokker-interface/ext/lib/perl5/Genegrokker/Common.pm
/usr/share/perl/5.6.1/IO/Socket/UNIX.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Genegrokker/Annotation.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Apache.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Apache/Constants.pm
/usr/share/perl/5.6.1/IO/Socket/INET.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/XML/Parser.pm
/usr/share/perl/5.6.1/strict.pm
/usr/share/perl/5.6.1/base.pm
/usr/share/perl/5.6.1/vars.pm
/usr/share/perl/5.6.1/utf8.pm
/usr/lib/perl/5.6.1/Config.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Genegrokker/Feature.pm
/home/aerives/genegrokker-interface/mod_perl/tools.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Crypt/CBC.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Digest/SHA1.pm
/usr/lib/perl/5.6.1/Data/Dumper.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Apache/Session.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Apache/Server.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/URI/Escape.pm
/home/aerives/genegrokker-interface/lib/perl/Validate.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/GskXmlProtocol.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Apache/Connection.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Genegrokker/User.pm
/usr/share/perl/5.6.1/Symbol.pm
/usr/share/perl/5.6.1/Exporter/Heavy.pm
/home/aerives/genegrokker-interface/mod_perl/genomic_img.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Storable.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Apache/Session/Lock/File.pm
/home/aerives/genegrokker-interface/mod_perl/genomicbrowser.pm
/home/aerives/genegrokker-interface/lib/perl/Authenticate.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/mod_perl.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Genegrokker/AnnotationSequence.pm
/home/aerives/genegrokker-interface/ext/var/tmp/genegrokker-interface-aerives/ssl_mod_perl_apache-startup.pl
/usr/share/perl/5.6.1/Benchmark.pm
/usr/lib/perl/5.6.1/IO/Handle.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/MD5.pm
/usr/lib/perl/5.6.1/Fcntl.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/XML/Parser/Expat.pm
/usr/lib/perl/5.6.1/IO/Seekable.pm
/usr/share/perl/5.6.1/Exporter.pm
/usr/lib/perl/5.6.1/IO/Socket.pm
/usr/share/perl/5.6.1/utf8_heavy.pl
/usr/lib/perl/5.6.1/Errno.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Genegrokker/SequenceRegion.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Genegrokker/Object.pm
/usr/lib/perl/5.6.1/DynaLoader.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Apache/Request.pm
/usr/share/perl/5.6.1/FileHandle.pm
/usr/share/perl/5.6.1/File/Spec/Unix.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Apache/Session/Serialize/Storable.pm
/usr/share/perl/5.6.1/SelectSaver.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/HTML/Template.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Genegrokker/DNAregex.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Apache/Session/Generate/MD5.pm
/usr/lib/perl/5.6.1/IO.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/auto/Storable/nfreeze.al
/usr/lib/perl/5.6.1/Socket.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/GD.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Genegrokker/Sequence.pm
/home/aerives/genegrokker-interface/lib/perl/GenegrokkerUtil.pm
/usr/lib/perl/5.6.1/IO/File.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/auto/Storable/_freeze.al
/usr/share/perl/5.6.1/integer.pm
/home/aerives/genegrokker-interface/lib/perl/SequenceNavigator.pm
/usr/lib/perl/5.6.1/XSLoader.pm
/home/aerives/genegrokker-interface/ext/lib/perl5/Digest/MD5.pm
/usr/share/perl/5.6.1/File/Spec.pm

Re: slow regex [BENCHMARK]

2002-01-24 Thread Paul Mineiro

Perrin Harkins wrote:

Your system has to be swapping horribly.  I bet that the ulimit for
whoever apache is running as has the memory segment set super low.

apache is running as me on my unloaded desktop (no way this is going to 
production until i figure this out).  my ulimit -v is unlimited.


That's a possibility.  I was also thinking that maybe mod_perl was built
against a different version of Perl, possibly one that has a problem
with this particular regex which was fixed in a later version.

both mod_perl and the script are using the debian packaged perl/libperl, 
the perl -V dump was given in the initial message.  

oh, and $seq is a normal scalar, not a tied one.

-- p






Re: slow regex [BENCHMARK]

2002-01-24 Thread Paul Mineiro

Robert Landrum wrote:


 I just ran this on my system here... It's completely unloaded (load 
 average: 0.11, 0.08, 0.02)

 Result:

 0 wallclock secs ( 0.06 usr + 0.00 sys = 0.06 CPU) @ 16.67/s (n=1)


 I ran it on a file that I created with

 perl -e print 'ABCGEFSK' x 25000  /tmp/seqdata 


right.  i probably should've mentioned earlier that CGAT x 5 is 
really fast in both mod_perl and command line.

if anybody wants my actual $seq data, please let me know.

-- p






Re: slow regex [BENCHMARK]

2002-01-23 Thread Paul Mineiro

Paul Mineiro wrote:

i've cleaned up the example to tighten the case:

the mod perl code  snippet is:

---

  my @cg;
 
  open DIL, '', /tmp/seqdata;
  print DIL $seq;
  close DIL;
 
  warn length seq = @{[length ($seq)]};
 
  my $t = timeit (1, sub {
while ($seq =~ /CG/g)
  {
push @cg, pos ($seq);
  }
 });
 
  print STDERR timestr ($t), \n;

---
 
which yields
length seq = 21 at 
/home/aerives/genegrokker-interface/mod_perl/genomic_img.pm line 634, 
GEN1 line 102
16 wallclock secs (15.56 usr +  0.01 sys = 15.57 CPU) @  0.06/s (n=1)

and the perl script (command line) version is:

---

#!/usr/bin/perl

use Benchmark;
use strict;

open DIL, '', /tmp/seqdata;
my $seq = DIL;
close DIL;

warn length seq is @{[length $seq]};

my @cg;

my $t = timeit (1, sub {
  while ($seq =~ /CG/g)
{
  push @cg, pos ($seq);
}
   });

print STDERR timestr ($t), \n;

---
which yields:

length seq is 21 at ./t.pl line 10.
 0 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU)

the data is pretty big, so i didn't attach it, but feel free to contact 
me directly for it.

-- p

hi.  i'm running mod_perl 1.26 + apache 1.3.14 + perl 5.6.1

i have a loop in a mod_perl handler like so:

  my $stime = time ();

  while ($seq =~ /CG/og)
{ 
  push @cg,  pos ($seq);
}

  my $etime = time ();

  warn time was: , scalar localtime ($stime),  ,
scalar localtime ($etime),  , $etime - $stime;  


under mod_perl this takes 23 seconds.  running the perl by hand (via 
extracting this piece into a seperate perl script) on the same data takes 
less than 1 second.

has anyone seen this kind of extreme slowdown before?

-- p

info:

apache build options:

CFLAGS=-g -g -O3 -funroll-loops \
LDFLAGS=-L/home/aerives/lib -L/home/aerives/lib/mysql \
LIBS=-L/home/aerives/genegrokker-interface/lib 
-L/home/aerives/genegrokker-interface/ext/lib -L/home/aerives/lib 
-L/home/aerives/lib/mysql \
./configure \
--prefix=/home/aerives/genegrokker-interface/ext \
--enable-rule=EAPI \
--enable-module=most \
--enable-shared=max \
--with-layout=GNU \
--disable-rule=EXPAT \
$@

mod_perl build options:

configure_options=PERL_USELARGEFILES=0 USE_APXS=1 
WITH_APXS=$PLAYPEN_ROOT/ext/sbin/apxs EVERYTHING=1 
INC=$PLAYPEN_ROOT/ext/include -DEAPI

perl -V:
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=linux, osvers=2.4.13, archname=i386-linux
uname='linux duende 2.4.13 #1 wed oct 31 19:18:07 est 2001 i686 unknown '
config_args='-Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux 
-Dprefix=/usr -Dprivlib=/usr/share/perl/5.6.1 -Darchlib=/usr/lib/perl/5.6.1 
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 
-Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.6.1 
-Dsitearch=/usr/local/lib/perl/5.6.1 -Dman1dir=/usr/share/man/man1 
-Dman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3perl 
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Duseshrplib 
-Dlibperl=libperl.so.5.6.1 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc', ccflags ='-DDEBIAN -fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-DDEBIAN -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.4  (Debian prerelease)', 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, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -ldb -ldl -lm -lc -lcrypt
perllibs=-ldl -lm -lc -lcrypt
libc=/lib/libc-2.2.4.so, so=so, useshrplib=true, libperl=libperl.so.5.6.1
  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: USE_LARGE_FILES
  Built under linux
  Compiled at Jan 11 2002 04:09:18
  %ENV:

PERL5LIB=/home/aerives/genegrokker-interface/lib/perl5:/home/aerives/genegrokker-interface/ext/lib/perl5:/home/aerives/lib/perl5
  @INC:
/home/aerives/genegrokker-interface/lib/perl5
/home/aerives/genegrokker-interface/ext/lib/perl5
/home/aerives/lib/perl5
/usr/local/lib/perl/5.6.1
/usr/local/share/perl/5.6.1
/usr/lib/perl5

Cross-site Scripting prevention with Apache::TaintRequest

2002-01-22 Thread Paul Lindner

Hi,

I thought it might be interesting to start a thread on cross-site
scripting attacks, since it seems that many people are not aware of
the risks involved.  Has anyone noticed attacks on their applications?
Do you religiously check all input you get from form-submissions?
What techniques do you use to insure that your application is not
vulnerable?

One technique that I've used is 'Tainting' input data (with
PerlTaintCheck) and using a subclass of the Apache module to insure
that tainted data is html-escaped.

As part of the CPANification of the code in the mod_perl Developer's
cookbook, I present Apache::TaintRequest, a module that helps prevent
cross-site scripting attacks by automatically html-escaping 'tainted'
text sent to a web browser..  Get it at
http://www.modperlcookbook.org/code.html

I'd be interested in hearing how others have dealt with the problem,
suggestions on how this module could be used further are most welcome.  


-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: Cross-site Scripting prevention with Apache::TaintRequest

2002-01-22 Thread Paul Lindner

On Tue, Jan 22, 2002 at 07:11:28PM +0100, Robin Berjon wrote:
 On Tuesday 22 January 2002 19:04, Perrin Harkins wrote:
  Of course I set the charset, but I didn't know that might not be enough.
  Does anyone know if Apache::Util::escape_html() and
  HTML::Entities::encode() are safe?
 
 A quick look (I could be wrong) at HTML::Entities seems to imply that it 
 should be safe, as it uses numeric encoding for characters that it doesn't 
 recognize. I don't know about Apache::Util.

BTW, if you don't html-escape and just search for tags you should make
sure to HTML::Entities::decode() the text before processing it.

I've seen cases where people disguised scripting code with numeric
entities.. jav...;script etc...

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



slow regex [BENCHMARK]

2002-01-20 Thread Paul Mineiro

hi.  i'm running mod_perl 1.26 + apache 1.3.14 + perl 5.6.1

i have a loop in a mod_perl handler like so:

  my $stime = time ();

  while ($seq =~ /CG/og)
{ 
  push @cg,  pos ($seq);
}

  my $etime = time ();

  warn time was: , scalar localtime ($stime),  ,
scalar localtime ($etime),  , $etime - $stime;  


under mod_perl this takes 23 seconds.  running the perl by hand (via 
extracting this piece into a seperate perl script) on the same data takes 
less than 1 second.

has anyone seen this kind of extreme slowdown before?

-- p

info:

apache build options:

CFLAGS=-g -g -O3 -funroll-loops \
LDFLAGS=-L/home/aerives/lib -L/home/aerives/lib/mysql \
LIBS=-L/home/aerives/genegrokker-interface/lib 
-L/home/aerives/genegrokker-interface/ext/lib -L/home/aerives/lib 
-L/home/aerives/lib/mysql \
./configure \
--prefix=/home/aerives/genegrokker-interface/ext \
--enable-rule=EAPI \
--enable-module=most \
--enable-shared=max \
--with-layout=GNU \
--disable-rule=EXPAT \
$@

mod_perl build options:

configure_options=PERL_USELARGEFILES=0 USE_APXS=1 
WITH_APXS=$PLAYPEN_ROOT/ext/sbin/apxs EVERYTHING=1 
INC=$PLAYPEN_ROOT/ext/include -DEAPI

perl -V:
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=linux, osvers=2.4.13, archname=i386-linux
uname='linux duende 2.4.13 #1 wed oct 31 19:18:07 est 2001 i686 unknown '
config_args='-Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux 
-Dprefix=/usr -Dprivlib=/usr/share/perl/5.6.1 -Darchlib=/usr/lib/perl/5.6.1 
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 
-Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.6.1 
-Dsitearch=/usr/local/lib/perl/5.6.1 -Dman1dir=/usr/share/man/man1 
-Dman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3perl 
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Duseshrplib 
-Dlibperl=libperl.so.5.6.1 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc', ccflags ='-DDEBIAN -fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-DDEBIAN -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.4  (Debian prerelease)', 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, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -ldb -ldl -lm -lc -lcrypt
perllibs=-ldl -lm -lc -lcrypt
libc=/lib/libc-2.2.4.so, so=so, useshrplib=true, libperl=libperl.so.5.6.1
  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: USE_LARGE_FILES
  Built under linux
  Compiled at Jan 11 2002 04:09:18
  %ENV:

PERL5LIB=/home/aerives/genegrokker-interface/lib/perl5:/home/aerives/genegrokker-interface/ext/lib/perl5:/home/aerives/lib/perl5
  @INC:
/home/aerives/genegrokker-interface/lib/perl5
/home/aerives/genegrokker-interface/ext/lib/perl5
/home/aerives/lib/perl5
/usr/local/lib/perl/5.6.1
/usr/local/share/perl/5.6.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.6.1
/usr/share/perl/5.6.1
/usr/local/lib/site_perl




Re: Single login/sign-on for different web apps?

2002-01-16 Thread Paul Lindner

On Wed, Jan 16, 2002 at 06:56:37PM -0500, Vsevolod Ilyushchenko wrote:
  
   3) Perl-based applications can just use the module and the common key
  to decrypt the contents of the cookie to find the authenticated
  username.  If the cookie is not present redirect to the central
  authentication page, passing in the URL to return to after
  authentication.
 
 Hmmm... Can I do it securely without using Kerberos? I think so. Looks like
 if I use https instead of http, people won't be able to steal my (encoded)
 session information as it is transmitted. And I can also add the IP address
 to the cookie information.
 
 But the cookies file might be readable by other people! If they can steal
 that file and change the IP address of another machine to yours, they can
 pretend they are you!
 I wonder if there is a way out of this...

Yes, you use the timestamp.  Just reauthenticate the user when they
try to do 'sensitive' activities.

For example you might allow someone to view their bank balance if they
typed their password within the last 2 hours.  Transferring money
might require a valid password within the last 10 minutes..

Of course, the best authentication system for banking I've seen is
from UBS.  They send you a scratchlist of around 100 numbers.  Every
time you login you use one of the numbers and cross it off.  Very
slick.


-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



mod_perl in the Open Directory (www.dmoz.org)

2002-01-10 Thread Paul Lindner

Hi,

I was recently accepted as the editor for the mod_perl category of the
Open Directory Project.  The ODP is an all volunteer effort to build a
directory of the web.  Check it out at http://dmoz.org or any number
of other services that use the underlying database (AOL, Google, etc.)
The mod_perl category is available at:

 http://dmoz.org/Computers/Software/Internet/Servers/WWW/Apache/Modules/Mod_Perl/

By expanding this category our community can do a lot to help promote
mod_perl.  The ODP is used by many search engines, and you'll notice
Google uses it for it's search results.  

I'm looking forward to building up the database of links.  I have a
number of my own favorites, but I'd like to hear from the rest of the
community.  If you have a mod_perl related site please submit it at:

   
http://dmoz.org/cgi-bin/add.cgi?where=Computers/Software/Internet/Servers/WWW/Apache/Modules/Mod_Perl

I'll edit through the submissions and craft a nice new structure
(probably similar to the way the PHP category is organized).  Proposed
categories are:

  Directories
  Documentation and FAQs
  Toolkits
  Modules

I may reorganize these based on the breadth of submissions offerred.

Thanks!

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



  1   2   3   4   >