Problems with APACHE::SSI

2002-02-28 Thread gaston

hi list

I'm using apache 1.3.23, mod_perl 1.26 (perl 5.6.1) and APACHE::SSI. In
a older
version (apache 1.3.19-6  mod_perl 1.24.99 (perl 5.6.0)) it works fine.

In httpd.conf i made a entry like

Files *.dhtml  
SetHandler perl-script
PerlHandler Apache::SSI
/Files

When i call a file test.dhtml (it should be empty or with SSI comands),
i got 
a entry in error_log like

[Thu Feb 28 09:07:58 2002] [notice] child pid 5305 exit signal
Segmentation fault (11) 

and by tracing the process i got 

...
32598 wait4(-1, 0xb890, WNOHANG, NULL) = 0
32598 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
32598 time(NULL)= 1014803873
32598 wait4(-1, 0xb890, WNOHANG, NULL) = 0
32598 select(0, NULL, NULL, NULL, {1, 0}) = ? ERESTARTNOHAND (To be
restarted)
32598 --- SIGCHLD (Child exited) ---
32598 select(0, NULL, NULL, NULL, {0, 9}) = 0 (Timeout)
32598 time(NULL)= 1014803874
32598 fork()= 428
32598 wait4(-1, [WIFSIGNALED(s)  WTERMSIG(s) == SIGSEGV], WNOHANG,
NULL) = 420
32598 time(NULL)= 1014803874
32598 write(15, [Wed Feb 27 10:57:54 2002] [noti..., 86) = 86
32598 wait4(-1, 0xb890, WNOHANG, NULL) = 0
32598 select(0, NULL, NULL, NULL, {1, 0} unfinished ...
428   rt_sigaction(SIGHUP, {0x8077700, [], SA_INTERRUPT|0x400},
{0x80777d0, [HUP USR1], 0x400}, 8) = 0
428   rt_sigaction(SIGUSR1, {0x8077700, [], SA_INTERRUPT|0x400},
{0x80777d0, [HUP USR1], 0x400}, 8) = 0
428   rt_sigaction(SIGTERM, {0x8077700, [], SA_INTERRUPT|0x400},
{0x80777c0, [], 0x400}, 8) = 0
...

In gdb i can see that the process dies in perl_handler() (modperl.c)
on offset 80. 

#0  0x402159d1 in perl_handler () from
/usr/local/apache/libexec/libperl.so
#1  0x0806c439 in ap_invoke_handler ()
#2  0x0808254f in process_request_internal ()
#3  0x080825c2 in ap_process_request ()
#4  0x08078f86 in child_main ()
#5  0x0807920a in make_child ()
#6  0x080795b8 in perform_idle_server_maintenance ()
#7  0x08079b8c in standalone_main ()
#8  0x0807a1cc in main ()
#9  0x400b67ee in __libc_start_main () from /lib/libc.so.6  

  (gdb) info reg
eax0x0  0
ecx0x887fa74143129204
edx0x13 19
ebx0x402cbde4   1076674020
esp0xb644   0xb644
ebp0xb66c   0xb66c
esi0x40014ce4   1073827044
edi0x83c673c138176316
eip0x402159d1   0x402159d1
eflags 0x10216  66070
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0  0
gs 0x0  0
fctrl  0x37f895
fstat  0x20 32
ftag   0x5  349525
fiseg  0x23 35
fioff  0x40271b62   1076304738
foseg  0x2b 43
fooff  0x81f5128136270120
fop0x55a1370
xmm0   0x
xmm1   0x
xmm2   0x
xmm3   0x
xmm4   0x
xmm5   0x
xmm6   0x
xmm7   0x
mxcsr  0x1f80   8064
(gdb) x/10i $eip
0x402159d1 perl_handler+49:   mov(%eax,%edx,4),%eax
0x402159d4 perl_handler+52:   mov%eax,0xfff8(%ebp)
0x402159d7 perl_handler+55:   mov0x158(%edi),%eax
0x402159dd perl_handler+61:   add$0xfffc,%esp
0x402159e0 perl_handler+64:   mov(%eax,%edx,4),%edx
0x402159e3 perl_handler+67:   mov%edx,0xfff0(%ebp)
0x402159e6 perl_handler+70:   push   $0xb
0x402159e8 perl_handler+72:   push   $0x1
0x402159ea perl_handler+74:   lea0xfffe38a5(%ebx),%eax
0x402159f0 perl_handler+80:   push   %eax   

Nevertheless i don't know what can i do any more. I tried several 
configurations on compiling apache and mod_perl (- INSTALL docu), but
it crashed every time in the same way. What's wrong?
Any help will be apriciate.

 
-- 
Mit freundlichen Grüßen

Jürgen Magin

**
##   
#  OCTOSOFT GmbH Mannheim http://www.octo-soft.de#
##
#  Jürgen Magin. Einsteinstr. 11, D 68519 Viernheim  #
##
#  Tel   : +49 6204/914874   #
#  Fax   : +49 6204/914875   #
#  EMail : [EMAIL PROTECTED]   #
##

Re: how to pass data in internal redirects?

2002-02-28 Thread Anton Permyakov

Take a look at PageKit (www.pagekit.org) - i use it and i like it.
This is good Perl MVC framework.
Anton.

- Original Message - 
From: F. Xavier Noria [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 26, 2002 12:09 PM
Subject: how to pass data in internal redirects?


 As an exercise studying mod_perl I am trying to see how could the MVC
 pattern be implemented.  I've thought a possible approach would be to
 write the model using normal Perl classes, and controllers and views
 with Apache modules.
 
 I suppose that controllers would use internal redirects to call the
 views, is there a way to pass Perl data this way?  For example, in the
 hangman game in O'Reilly's book a controller would load a session from
 the cookie, process user's guest, modify the state and redirect the
 request internally to the view.  Ideally the view shouldn't read the
 data to display from the database again... could it be passed somehow by
 the first content handler?
 
 -- fxn






[ANNOUNCE] mod_perl logo competition...

2002-02-28 Thread Jonathan M. Hollin

Fellow JAPHs,

The closing date for entries for the new mod_perl logo is Monday 4th
March  No further submissions will be accepted after that date

Voting will take place between March 5th and March 11th  You may vote
once for a logo and once for a button (a banner will be designed around
the winning logo) and the winner(s) will be announced on March 12th
Voting instructions will follow in a later post

Reminders:  Send logo entries to: mod_perl [at] digital-wordcom
Review the current submissions at:
http://beverley2digital-wordcom/mod_perl/

Thank you


Jonathan M Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypugpmorg/ 





RE: Apache stops serving requests

2002-02-28 Thread Jeremy Rusnak

Is this for example only on the machines running Linux 2.4, did you
recompile everything including Perl, what compiler and compilation
options did you use, are you using DSO, have you read the file
mod_perl/SUPPORT, have you tried mod_perl-1.26_01 and/or
apache_1.3.23...?

This has been happening on both 2.4 and 2.2 machines.  I've recompiled
everything but Perl itself (5.6.0) with the stock Redhat 6.2 and 7.2
compiler.  I have not tried 1.26_01 or apache 1.3.23 as of yet,
I'm hoping someone will be able to say this is the problem so
I can have a clear understanding of what has happened.  I sometimes
lose sleep over problems that just go away.

I'm not using DSO, everything is compiled directly into httpd.

I apologize for not providing everything that one normally would
from the SUPPORT file.  I've been using mod_perl for two years now
and the signature from this one seemed so unique that if someone
else had run into it I'd find out right away.

Server version: Apache/1.3.22 (Unix)
Server built:   Jan 15 2002 18:57:13
Server's Module Magic Number: 19990320:10
Server compiled with
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_SHMGET_SCOREBOARD
 -D USE_MMAP_FILES
 -D HAVE_FCNTL_SERIALIZED_ACCEPT
 -D HAVE_SYSVSEM_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D HTTPD_ROOT=/home/httpd
 -D SUEXEC_BIN=/home/httpd/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_XFERLOG=logs/access_log
 -D DEFAULT_ERRORLOG=logs/error_log
 -D TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf
 -D ACCESS_CONFIG_FILE=conf/access.conf
 -D RESOURCE_CONFIG_FILE=conf/srm.conf

Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_setenvif.c
  mod_perl.c

 We're running several other machines on Apache 1.3.22 and I've

You mean you're running Apache 1.3.22 without mod_perl on several
other machines?

That's correct.  I haven't noticed a similiar problem using 1.3.22
by itself or with PHP (which is used on several boxes as well).
I was thinking perhaps it could be something with 1.3.22, but
since it isn't happening elsewhere I'm not positive.

 only really run into this problem on the mod_perl boxes.
Is the word really of any significance here?

I'm maintaining around 12 web servers which all have hiccups from
time to time.  The problem I have described definately happens
on the mod_perl boxes once or twice a day.  The handful of problems
on the other machines I'm of course starting to second guess and
wonder about, but it's just paranoia.  Guess I should keep a more
detailed log for myself when servers have problems.

Thanks very much,
Jeremy



Apache::Session problems

2002-02-28 Thread Domien Bakker
Title: Apache::Session problems 






Hello,


I am trying to use Apache::Session to store http session information. 

The version number of Apache::Session is 1.54. It is running on Apache/1.3.20 (Unix) mod_perl/1.26 configured.


I am using the TicketTool from the o'reilly book, I make a tie as follows in TicketTool.pm

my (%session, $cookie);

 tie %session, 'Apache::Session::MySQL', $cookie, { DataSource = 'dbi:mysql:ETNA',

 UserName = 'user',

 Password = '',

 LockDataSource = 'dbi:mysql:ETNA',

 LockUserName = 'user',

 LockPassword = ''

};


In an other handler I am trying to recreate the session


tie %session, 'Apache::Session::MySQL', $session_id, {

 Handle = $dbh,

 LockHandle = $dbh

 };

$dbh contains a handle to a MySQL database


I also tried it with:


tie %session, 'Apache::Session::MySQL', $session_id, {

 DataSource = 'dbi:mysql:ETNA',

 UserName = 'user',

 Password = '***',

 LockDataSource = 'dbi:mysql:ETNA',

 LockUserName = 'user',

 LockPassword = '***'

   };



Both methods resolve to the same error:


[Thu Feb 28 11:46:39 2002] [error] Storable binary image v24.48 more recent than I am (v2.4) at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 351, at /usr/local/lib/perl5/site_perl/5.6.1/Apache/Session/Serialize/Storable.pm line 27

Does anybody knows a sollution to this problem, as far as I can see, all Apache::Session modules are up to date.




Met vriendelijke groet / With kind regards,

Domien Bakker

Application Developer


Application development

Operations and Engineering

ZeelandNet BV


Postbus 35

4493 ZG Kamperland

The Netherlands

tel. +31 (0)113 377733

fax +31 (0)113 377784

domien@staff.zeelandnet.nl 

http://www.zeelandnet.nl/







Re: Apache::Session problems

2002-02-28 Thread Chris Winters

On Thu, 2002-02-28 at 06:16, Domien Bakker wrote:
 Hello,
 
 I am trying to use Apache::Session to store http session information. 
 The version number of Apache::Session is 1.54. It is running on
 Apache/1.3.20 (Unix) mod_perl/1.26 configured.
 ...
 Both methods resolve to the same error:
 
 [Thu Feb 28 11:46:39 2002] [error] Storable binary image v24.48 more
 recent than I am (v2.4) at blib/lib/Storable.pm (autosplit into
 blib/lib/auto/Storable/thaw.al) line 351, at
 /usr/local/lib/perl5/site_perl/5.6.1/Apache/Session/Serialize/Storable.p
 m line 27
 
 Does anybody knows a sollution to this problem, as far as I can see, all
 Apache::Session modules are up to date.

This sounds like someone with a more recent version of Storable in their
private lib has been testing sessions or something, since there's a
mismatch of what is in the database versus the module trying to read the
data. Be sure you've got the latest version of Storable installed.

Chris
 
-- 
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.




Re: how to disable mod_perl in a subdir?

2002-02-28 Thread Dan Baker

the host has that commented out for some reason:
  Alias /cgi-bin/ /home/seniordiscounts/cgi-bin/
  Location /cgi-bin
SetHandler perl-script
#PerlHandler Apache::PerlRun
PerlHandler Apache::Registry
Options +ExecCGI
  /Location

please explain how PerlRun might be better?
---

Marc Slagle wrote:
 
 Maybe you can try Apache::PerlRun instead of Apache::Registry for the
 directories that you need to run those scripts.  The perldocs show how to
 set it up.
 
 Marc Slagle
 
 - Original Message -
 From: Dan Baker [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, February 27, 2002 11:14 PM
 Subject: how to disable mod_perl in a subdir?
 
  I am working with a host that has everything under /cgi-bin running
  mod_perl by default, and well as using EmbPerl to run the dynamic pages.
  Unfortunately, I have a set of scripts that really need regular perl,
  and I can't seem to figure out the configuration to  disable mod_perl in
  a specific directory that needs
  regular perl. ;(
 
  I tried this in the httpd.conf file:
  Directory /home/mydomain/cgi-bin/webadmin/
SetHandler default-handler
AddHandler cgi-script .pl
AllowOverride All
  /Directory
 
  and then ALSO editted a .htaccess file in
  /home/mydomain/cgi-bin/webadmin/ to include:
options +ExecCGI
RemoveHandler perl-script
SetHandler cgi-script
AddHandler cgi-script .pl
 
  and it still tries to use mod_perl?!
 
  SERVER_SOFTWARE = Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1
  OpenSSL/0.9.6 mod_perl/1.24_01
 
  PLEASE let me know if there is a way to configure so that a specific
  sub-dir uses regular perl.
 
  Dan
 



Re: Apache::Session problems

2002-02-28 Thread Adam Worrall

 CW == Chris Winters [EMAIL PROTECTED] writes:

 On Thu, 2002-02-28 at 06:16, Domien Bakker wrote:
 
 [Thu Feb 28 11:46:39 2002] [error] Storable binary image v24.48
 more recent than I am (v2.4) at blib/lib/Storable.pm (autosplit
 into blib/lib/auto/Storable/thaw.al) line 351, at
 /usr/local/lib/perl5/site_perl/5.6.1/Apache/Session/Serialize/Storable.p
 m line 27

CW This sounds like someone with a more recent version of Storable
CW in their private lib has been testing sessions or something,
CW since there's a mismatch of what is in the database versus the
CW module trying to read the data. Be sure you've got the latest
CW version of Storable installed.

I had a very similar problem, claiming that the data was serialised
using version 50.xx; I think it indicates that the serialised data is
somehow corrupt. I think I saw it because I had frozen a scalar that was
not a reference, but I could be mistaken.

But it is not a version problem, it just looks like one ;)

Anway, after fixing some other bugs, blowing away the stored items and
re-starting, the problem vanished.

Good luck,

 - Adam



Re: how to disable mod_perl in a subdir? Directory vs Location

2002-02-28 Thread Dan Baker



Rick Myers wrote:
 
 On Feb 27, 2002 at 21:14:00 -0700, Dan Baker wrote:
 
  I am working with a host that has everything under /cgi-bin running
  mod_perl by default, and well as using EmbPerl to run the dynamic pages
 
 This begs the question, how are they doing that?
 
 I mean, if they're using Location's or File's then you're
 going to have to bend to their whim since those override
 Directory's
 
--

hhmmm, so if they have set up in httpdconf:

  Alias /cgi-bin/ /home/seniordiscounts/cgi-bin/
  Location /cgi-bin
SetHandler perl-script
#PerlHandler Apache::PerlRun
PerlHandler Apache::Registry
Options +ExecCGI
  /Location

then the non mod_perl section:

Directory /home/seniordiscounts/cgi-bin/webadmin/
  SetHandler default-handler
  AddHandler cgi-script pl
  AllowOverride All
/Directory 

will be overidden? I guess then I should add an alias line and switch to
using Location ?

Dan



RE: Apache stops serving requests

2002-02-28 Thread Ged Haywood

Hi again,

On Thu, 28 Feb 2002, Jeremy Rusnak wrote:

 This has been happening on both 24 and 22 machines  I've recompiled
 everything but Perl itself (560) with the stock Redhat 62 and 72

Definitely go for 561 at least, 560 is buggy  Compile your own,
don't use RPMs unless you have evidence they'll be OK  I use 572
now in development and I'd be quite happy with to go live with it,
although I don't do anything fancy in my Perl code if I can avoid it

I would stick with the compiler from 62, gcc has been having its own
growing pains recently but I'll admit I'm not up to date with the
present state of it  The last time I looked, the latest gcc couldn't
reliably compile the Linux kernel

 I'm hoping someone will be able to say this is the problem

I haven't seen anything resembling this mentioned here on the mod_perl List

 lose sleep over problems that just go away

Yep

 Compiled-in modules:
 

Nothing contentious there  You doing anything with suexec?  Dunno why I ask

 I was thinking perhaps it could be something with 1322, but
 since it isn't happening elsewhere I'm not positive

I have seen a couple of problems on 1322 which seemed to be fixed by upgrade
to 23 but as I said, they didn't seem to bear any resemblance to your trouble

 I'm maintaining around 12 web servers which all have hiccups from
 time to time

How often is from time to time?  I expect my servers to run quite
literally for years without any hiccups at all

 The problem I have described definately happens
 on the mod_perl boxes once or twice a day  The handful of problems
 on the other machines I'm of course starting to second guess and
 wonder about, but it's just paranoia

I'm not so sure  Just because you're paranoid it doesn't mean they
aren't all out to get you

 Guess I should keep a more detailed log

Agreed

Do you compile your own kernels?

73,
Ged




Re: Apache stops serving requests

2002-02-28 Thread Tim Tompkins

While rebuilding perl and apache/modperl could possibly fix it, check your
error log for segmentation faults.


Regards,

Tim Tompkins
--
Programmer
http://www.arttoday.com/
http://www.rebelartist.com/
--





Apache::DB patch

2002-02-28 Thread Enrico Sorcinelli

Hi all,
I started to use Apache::DB (0.06) to interactively debug under mod_perl using ptkdb. 
I see that is necessary to modify Apache/DB.pm but, after this, the debugger will be 
run always under ptkdb. The little patch I propose to Apache/DB.pm is to improve 
Apache to dinamically switch from command line to GUI (ptkdb) interface by configuring 
this in httpd.conf.
To enable ptkdb I add the directive:
 
PerlSetVar PerlTkDB On
 
in preferred place of my httpd.conf. For example:

Location /someplace
   IfDefine PERLDB
  PerlSetVar PerlTkDB On
  PerlFixupHandler Apache::DB
   /IfDefine
   SetHandler perl-script
   PerlHandler Apache::MyModule
/Location

then start Apache with:

% httpd -D PERLDB

If Devel::ptkdb isn't installed, then default debug libraries (perl5db.pl) are loaded.

---CUT HERE---
--- DB.pm   Thu Feb 28 16:45:29 2002
+++ DB.pm-patched   Thu Feb 28 16:31:12 2002
@@ -26,7 +26,9 @@
 
 init();
 
-require 'Apache/perl5db.pl';
+unless ( $r-dir_config('PerlTkDB')  eval(require 'Devel/ptkdb.pm') ) {
+require 'Apache/perl5db.pl';
+}
 $DB::single = 1;
 
 if (ref $r) {
---CUT HERE---
 
(run the patch in the same directory of Apache/DB.pm)

Any comment will be appreciated.

Enrico

=
Enrico Sorcinelli - Gruppo E-Comm - Italia On Line S.p.a.
E-Mail: [EMAIL PROTECTED] - [EMAIL PROTECTED]
=



XML::Twig

2002-02-28 Thread Stathy G. Touloumis

Hi,

Has anyone experienced problems when using the XML::Twig with mod_perl?
Everything works fine outside a mod_perl environment but when attempting to
perform the same functionality in mod_perl the child process seg faults even
when using 'safe_parse' which is supposed to wrap the parsing in an 'eval'
and return an error code instead of dying.

Thanks,




Re: XML::Twig

2002-02-28 Thread Matt Sergeant

On Thu, 28 Feb 2002, Stathy G Touloumis wrote:

 Hi,

 Has anyone experienced problems when using the XML::Twig with mod_perl?
 Everything works fine outside a mod_perl environment but when attempting to
 perform the same functionality in mod_perl the child process seg faults even
 when using 'safe_parse' which is supposed to wrap the parsing in an 'eval'
 and return an error code instead of dying

It's the built in expat bug Upgrade XML::Parser to 230, then upgrade
Apache to latest The problem should go away

-- 
!-- Matt --
:-Get a smart net/:-




RE: Apache stops serving requests

2002-02-28 Thread Jeremy Rusnak

Definitely go for 5.6.1 at least, 5.6.0 is buggy.  Compile your own,
don't use RPMs unless you have evidence they'll be OK.  I use 5.7.2
now in development and I'd be quite happy with to go live with it,
although I don't do anything fancy in my Perl code if I can avoid it.

I'll give this a shot.

I would stick with the compiler from 6.2, gcc has been having its own
growing pains recently but I'll admit I'm not up to date with the
present state of it.  The last time I looked, the latest gcc couldn't
reliably compile the Linux kernel.

There are a series of patches that supposedly help with that problem,
but I agree.

Nothing contentious there.  You doing anything with suexec?  Dunno why I
ask.

No, suexec is disabled.

I have seen a couple of problems on 1.3.22. which seemed to be fixed by
upgrade
to .23 but as I said, they didn't seem to bear any resemblance to your
trouble.

Maybe I will reroll everything up the latest version and see what happens.

 I'm maintaining around 12 web servers which all have hiccups from
 time to time.

How often is from time to time?  I expect my servers to run quite
literally for years without any hiccups at all.

Well about once a month or so one of the servers will need attention for
one reason or another.  We've got some relatively old hardware (SMP P2
400mhz
boxes) mixed in that we are pushing very hard...We've been replacing these
older midtowers with 1U rack mounts which helps.  Most of our boxes have
uptime of over a year, it's just that sometimes a MySQL table gets
corrupted here or there, a server gets a DOS attack, etc.

Do you compile your own kernels?

Yes.  For the most part I compile everything we need right into the kernel
and disable loadable module support (dunno why, I've just always been
happier building it right in than using modules).  The only exception to
this are the newer 1U machines.  They are Penguin Computing boxes and
we're using the stock 2.4 kernels they came with (haven't had any
problems with those machines either).  I don't upgrade kernels that
often (if it isn't broken...) as I'm offsite and we've got just about
everything blocked out at the router except port 80.

Jeremy




RE: Apache stops serving requests

2002-02-28 Thread Jeremy Rusnak

While rebuilding perl and apache/modperl could possibly fix it, check your
error log for segmentation faults.

No segfaults at all.  The last core file I've got on one of the affected
boxes is from early January.

Thanks,
Jeremy



Re: How to do connection pooling

2002-02-28 Thread Joachim Zobel

At 02:11 280202 +0530, you wrote:
Hi all,
How can I maintain the connections in perl? For this I want to use 
connection pooling to contol the traffic of my site How can I do this in 
perl? Can anybody help me in this regard? If possible please give the 
steps included in this

Is Apache::DBI what you need? If not, why?  It is in fact not about 
controlling traffic, its about reusing database connections to sve the time 
needed for a connect

Sincerely,
Joachim

--
 ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden
koennen- Bertolt Brecht - Leben des Galilei




RE: How to do connection pooling

2002-02-28 Thread Stathy G. Touloumis

Are you perhaps referring to KeepAlive of the TCP/IP client connection?

 How can I maintain the connections in perl? For this I want to use 
 connection pooling to contol the traffic of my site How can I 
 do this in 
 perl? Can anybody help me in this regard? If possible please give the 
 steps included in this
 
 Is Apache::DBI what you need? If not, why?  It is in fact not about 
 controlling traffic, its about reusing database connections to 
 sve the time 
 needed for a connect




Re: how to disable mod_perl in a subdir? Directory vs Location

2002-02-28 Thread Rick Myers

On Feb 28, 2002 at 05:54:07 -0700, Dan Baker wrote:
 
 Rick Myers wrote:
  
  On Feb 27, 2002 at 21:14:00 -0700, Dan Baker wrote:
  
   I am working with a host that has everything under /cgi-bin running
   mod_perl by default, and well as using EmbPerl to run the dynamic pages
  
  This begs the question, how are they doing that?
  
  I mean, if they're using Location's or File's then you're
  going to have to bend to their whim since those override
  Directory's
  
 --
 
 hhmmm, so if they have set up in httpdconf:
 
   Alias /cgi-bin/ /home/seniordiscounts/cgi-bin/
   Location /cgi-bin
 SetHandler perl-script
 #PerlHandler Apache::PerlRun
 PerlHandler Apache::Registry
 Options +ExecCGI
   /Location
 
 then the non mod_perl section:
 
 Directory /home/seniordiscounts/cgi-bin/webadmin/
   SetHandler default-handler
   AddHandler cgi-script pl
   AllowOverride All
 /Directory 
 
 will be overidden?

Right At least that's how I read the relevant doc

   http://httpdapacheorg/docs/sectionshtml

 I guess then I should add an alias line and switch to
 using Location ?

That would work, but see the above doc Location's are
processed in the order they appear in the conf file

--rick




webmail for mod_perl?

2002-02-28 Thread will trillich

is there a sane implementation of webmail-style mod_perl
modules for apache?

we're looking to offer email access online through
apache/mod_perl similar to what folks get at yahoo/egroups --
and we're hoping to find some mod_perl code that'll hook into
pop/imap email servers. (and we're hoping to avoid loading php
into ram.) i saw a thread in the archives (begun on Wed, 12 Dec
2001 by Medi Montaseri) but most of the suggestions seemed to
point to php. we're hoping to stick with mod_perl. :)

rtfm welcome if you specify which fm to r. :) thanks...

--thanks!

-- 
Legalize Liberty.
 
[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



Re: webmail for mod_perl?

2002-02-28 Thread Wim Kerkhoff

will trillich wrote:
 
 is there a sane implementation of webmail-style mod_perl
 modules for apache?
 
 we're looking to offer email access online through
 apache/mod_perl similar to what folks get at yahoo/egroups --
 and we're hoping to find some mod_perl code that'll hook into
 pop/imap email servers (and we're hoping to avoid loading php
 into ram) i saw a thread in the archives (begun on Wed, 12 Dec
 2001 by Medi Montaseri) but most of the suggestions seemed to
 point to php we're hoping to stick with mod_perl :)
 
 rtfm welcome if you specify which fm to r :) thanks

Are you needing any specific functionality?

sparkle (a rewrite of acmemail) works as a mod_perl handler, under
Apache::Registry, and of course as a normal CGI Works with various IMAP
servers via Mail::Cclient Uses Template Toolkit for
themes/templates/skins

It's quite peppy once you add all the modules into startuppl

It's only in CVS, and doesn't have current docs or CPAN style installer
(yet)

SF project:
  http://sourceforgenet/projects/acmemail/

Old page about it:
  http://wwwastraycom/acmemail/devel/

Screenshots (nothing fancy):
  http://nyetworkorg/acmemail/screenshots/

Wim



Re: How to do connection pooling

2002-02-28 Thread Tom Hukins

On Thu, Feb 28, 2002 at 09:38:39PM +0100, Joachim Zobel wrote:
 At 02:11 280202 +0530, you wrote:
 Hi all,
 How can I maintain the connections in perl? For this I want to use 
 connection pooling to contol the traffic of my site How can I do this in 
 perl? Can anybody help me in this regard? If possible please give the 
 steps included in this
 
 Is Apache::DBI what you need? If not, why?  It is in fact not about 
 controlling traffic, its about reusing database connections to sve the time 
 needed for a connect

There was a discussion of database pooling and reusing DBI connections
on Perl Monks today:
http://perlmonksorg/indexpl?node_id=148233

Tom



Re: webmail for mod_perl?

2002-02-28 Thread Chuck Goehring


I send only. Using MIME::Lite as below.  Working real well.  Requirements
included attachments and return receipts.

Havn't had to do the whole mail server thing.

Chuck

use MIME::Lite;
$lPB .= \n\n;
foreach $recip (@recips) {
  $recip = CheckEAddress($recip);
  $msg = build MIME::Lite From = $aApobj-getEmail_Address,
  To  = $recip, Subject = $Sub,
  Type = 'TEXT', Data = $lPB;

  $OpStatus .= BRBRecipient: $recip./B;
  if($aReceipt ne '') {  # If return reciept requested.
$msg-add(Disposition-Notification-To=
$aApobj-getEmail_Address);
  }
  #$TempFileName = $NewDocName;
  if(0==0) { # Production mode.
attach $msg
  Type = 'image/save_as_tiff',
  Encoding = 'base64',
  Path = $TempFileName,
  Filename = $NewDocName;
  }
...

- Original Message -
From: will trillich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 28, 2002 3:49 PM
Subject: webmail for mod_perl?


 is there a sane implementation of webmail-style mod_perl
 modules for apache?

 we're looking to offer email access online through
 apache/mod_perl similar to what folks get at yahoo/egroups --
 and we're hoping to find some mod_perl code that'll hook into
 pop/imap email servers. (and we're hoping to avoid loading php
 into ram.) i saw a thread in the archives (begun on Wed, 12 Dec
 2001 by Medi Montaseri) but most of the suggestions seemed to
 point to php. we're hoping to stick with mod_perl. :)

 rtfm welcome if you specify which fm to r. :) thanks...

 --thanks!

 --
 Legalize Liberty.

 [EMAIL PROTECTED]
 http://sourceforge.net/projects/newbiedoc -- we need your brain!
 http://www.dontUthink.com/ -- your brain needs us!





Re: Apache::DB patch

2002-02-28 Thread Stas Bekman

Enrico Sorcinelli wrote:
 Hi all,
 I started to use Apache::DB (0.06) to interactively debug under mod_perl using 
ptkdb. I see that is necessary to modify Apache/DB.pm but, after this, the debugger 
will be run always under ptkdb. The little patch I propose to Apache/DB.pm is to 
improve Apache to dinamically switch from command line to GUI (ptkdb) interface by 
configuring this in httpd.conf.

Hi Enrico,

Does it actually work for you? My previous experience with it wasn't so 
good. I was manually loading Devel/ptkdb.pm instead of Apache/perl5db.pl
and it'll work for the first request, but then will hang. I see that 
ptkdb hasn't changed since the last time I've tried it. May be it's a 
newer perlTk that works better now?





_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




ANNOUNCE: Apache::Watchdog::RunAway v0.3

2002-02-28 Thread Stas Bekman


The uploaded file

 Apache-Watchdog-RunAway-0.3.tar.gz

has entered CPAN as

   file: $CPAN/authors/id/S/ST/STAS/Apache-Watchdog-RunAway-0.3.tar.gz
   size: 7722 bytes
md5: 701b7a99fe658c5b895191e5f03fff34

Changes:

=head1 ver 1.0 Wed Feb 20 11:54:23 SGT 2002

* making the DEBUG a constant variable, settable via PerlSetVar

* A few code style changes and doc fixes

* this module has spent enough time in alpha/beta incubator = going 1.0.

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




ANNOUNCE: Apache::GTopLimit v1.0

2002-02-28 Thread Stas Bekman

The uploaded file

 Apache-GTopLimit-1.0.tar.gz

has entered CPAN as

   file: $CPAN/authors/id/S/ST/STAS/Apache-GTopLimit-1.0.tar.gz
   size: 5117 bytes
md5: d1847eecbf8584ae04f9c0081e22897f

=head1 ver 1.0 Wed Feb 20 11:54:23 SGT 2002

* making the DEBUG a constant variable, settable via PerlSetVar

* A few code style changes and doc fixes

* this module has spent enough time in alpha/beta incubator = going 1.0.


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: ANNOUNCE: Apache::Watchdog::RunAway v0.3

2002-02-28 Thread Stas Bekman

oops, wrong changes file. corrected below:

Stas Bekman wrote:
 
 The uploaded file
 
 Apache-Watchdog-RunAway-0.3.tar.gz
 
 has entered CPAN as
 
   file: $CPAN/authors/id/S/ST/STAS/Apache-Watchdog-RunAway-0.3.tar.gz
   size: 7722 bytes
md5: 701b7a99fe658c5b895191e5f03fff34
 
 Changes:

=head1 ver 0.3 - Wed Feb 20 14:09:32 SGT 2002

* rewrite debug and error handling code, so one can actually benefit
   from debug levels


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: ANNOUNCE: Apache::Watchdog::RunAway v0.3

2002-02-28 Thread Matt Sergeant

On Fri, 1 Mar 2002, Stas Bekman wrote:


 The uploaded file

  Apache-Watchdog-RunAway-03targz
  ^^^
 * this module has spent enough time in alpha/beta incubator = going 10
   ^^^

So which is it? ;-)

-- 
!-- Matt --
:-Get a smart net/:-




cvs commit: modperl-2.0 INSTALL

2002-02-28 Thread stas

stas02/02/28 01:50:27

  Added:   .INSTALL
  Log:
  add pointer for install docs
  Submitted by: Daniel R Risacher [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.1  modperl-2.0/INSTALL
  
  Index: INSTALL
  ===
  See docs/src/docs/2.0/user/install/install.pod
  
  
  
  
  



cvs commit: modperl-2.0 INSTALL

2002-02-28 Thread stas

stas02/02/28 01:57:09

  Modified:INSTALL
  Log:
  - correct the path
  
  Revision  ChangesPath
  12   +1 -1  modperl-20/INSTALL
  
  Index: INSTALL
  ===
  RCS file: /home/cvs/modperl-20/INSTALL,v
  retrieving revision 11
  retrieving revision 12
  diff -u -r11 -r12
  --- INSTALL   28 Feb 2002 09:50:27 -  11
  +++ INSTALL   28 Feb 2002 09:57:09 -  12
   -1,3 +1,3 
  -See docs/src/docs/20/user/install/installpod
  +See docs/user/install/installpod
   
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_perl.c

2002-02-28 Thread dougm

dougm   02/02/28 19:30:04

  Modified:src/modules/perl modperl_perlc
  Log:
  trickery to prevent perl_destruct from freeing the environ array does
  not work in win32 service shutdown  pull a different stunt to get the
  same effect, preventing the server from crashing
  
  Revision  ChangesPath
  111  +18 -0 modperl-20/src/modules/perl/modperl_perlc
  
  Index: modperl_perlc
  ===
  RCS file: /home/cvs/modperl-20/src/modules/perl/modperl_perlc,v
  retrieving revision 110
  retrieving revision 111
  diff -u -r110 -r111
  --- modperl_perlc11 Dec 2001 04:43:36 -  110
  +++ modperl_perlc1 Mar 2002 03:30:03 -   111
   -85,6 +85,7 
   
   void modperl_perl_destruct(PerlInterpreter *perl)
   {
  +char **orig_environ = NULL;
   dTHXa(perl);
   
   PERL_SET_CONTEXT(perl);
   -97,7 +98,20 
* at least, not if modperl is doing things right
* this is a bug in Perl
*/
  +#   ifdef WIN32
  +/*
  + * PL_origenviron = environ; doesn't work under win32 service
  + * we pull a different stunt here that has the same effect of
  + * tricking perl into _not_ freeing the real 'environ' array
  + * instead temporarily swap with a dummy array we malloc
  + * here which is ok to let perl free
  + */
  +orig_environ = environ;
  +environ = safemalloc(2 * sizeof(char *));
  +environ[0] = NULL;
  +#   else
   PL_origenviron = environ;
  +#   endif
   #endif
   
   if (PL_endav) {
   -113,4 +127,8 
   #ifndef WIN32
   perl_free(perl);
   #endif
  +
  +if (orig_environ) {
  +environ = orig_environ;
  +}
   }