Re: [OT] Replacing reverse squid with mod_proxy

2002-03-26 Thread Igor Sysoev

On Mon, 25 Mar 2002, Hans Juergen von Lengerke wrote:

 We are currently using squid set up as a reverse proxy to accelerate
 several heavy backends (mod_perl, etc) and to protect them from slow
 client connections.
 
 I am looking into replacing the squid with apache+mod_proxy. Why?
 Because ultimately I'd like to be able to cluster the frontend using
 mod_backhand + wackamole. The primary reason for clustering isn't for
 load-balancing (yet) but for failover handling. So, ideally, one machine
 should be enough to serve the whole server load.
 
 Speaking of load, the squid (2.3.STABLE1) is currently doing up to 80
 requests per second at a cache hit ratio of around 72%. This is on one
 box, a Dual 500MHz Pentium III with 1GB RAM. Average object size is 6KB.
 200/304 ratio is around 5/3.
 
 Now, I've tried to replace the squid with apache+mod_proxy (1.3.11) and
 the frontend very quickly came to a standstill. I set MaxClients to 256
 but all slots filled up fast. I upped MaxClients to 512 (recompiled with
 patched httpd.h) but the result was the same. All slots were occupied in
 no time and the server ground to a halt.
 
 Now I'm left with two choices: give up or try harder :-)
 
 Before I decide for one of them I thought I'd ask on the lists (sorry
 for the x-post) to see if the above numbers (80 Hits/Second) are in fact
 feasible with apache/mod_proxy on one box. Are there any benchmarks
 around? Does someone have a similar setup and how many requests can they
 serve?  Should I up MaxClients any further? Will I get better results
 using a newer version of apache? Or should I give up and stick with
 squid?

Apache can easy handle 80r/s on Ethernet or localhost connection.
But if connections are slow (i.e. modem users) and responses
are big enough then you can reach MaxClients. As far as I know
80r/s rate requires about 400-600 Apache with 20-40K responses.
If your responses are bigger then more Apaches you need.

You can increase MaxClients until your swap is free.
On 1G you can run about 1000-2000 plain Apaches.

But if you plan to use mod_proxy to proxy backend I think
you should use mod_accel.

Igor Sysoev





[PATCH] Class::DBI (auto_increment in Apache::DBI)

2002-03-26 Thread Tatsuhiko Miyagawa

I use Class::DBI + DBD::mysql in mod_perl Apache::DBI enabled
environment. I've found

  SELECT LAST_INSERT_ID

would *sometimes* cause vizarre result in persistent connection. It
happens very rarely, but the phenomenon is gone away we stop-start the
httpd.

Here's a patch for Class::DBI that fix this problem (*1) (for
0.36). In evey installation of Class::DBI I've applied this patch, and
the problem above never happens with it.

It should be clever that Class/DBI.pm can be free from this
mysql-dependent hardcode into each subclasses (Strategy Pattern, or
DBIx::AnyDBD?).

*1) error message is as follows:

  Can't call method call_hook on an undefined value at /usr/local/lib/
  perl5/site_perl/5.005/Class/DBI.pm line 101.


--
Tatsuhiko Miyagawa [EMAIL PROTECTED]


--- DBI.pm~ Fri Nov  2 00:43:27 2001
+++ DBI.pm  Fri Mar  8 00:57:17 2002
@@ -125,10 +125,7 @@
 $sth-execute(values %$data);
 # If we still don't have a primary key, try AUTO_INCREMENT.
 unless( _safe_exists($data, $self-primary) ) {
-  $sth = $self-sql_LastInsertID;
-  $sth-execute;
-  $data-{$self-primary} = ($sth-fetch)[0];
-  $sth-finish;
+  $data-{$self-primary} = $class-db_Main-{mysql_insertid};
 }
   };
   if($@) {




[OT] CPAN hacked?

2002-03-26 Thread Ernest Lergon

Hi,

is http://search.cpan.org hacked?

Enclosed two traceroutes FYI.

Ernest



cpan.org 209.85.157.220
---

[snip]
  5   160 ms   150 ms   161 ms  dt-gw.wswdc.ip.att.net [194.25.6.234]
  6   160 ms   161 ms   160 ms  12.122.11.233
  7   170 ms   180 ms   180 ms  tbr1-cl4.sl9mo.ip.att.net [12.122.10.30]
  8   180 ms   190 ms   171 ms  tbr2-p012401.sl9mo.ip.att.net [12.122.9.142]
  9 *** Timeout
 10   210 ms   211 ms   220 ms  gbr5-p40.la2ca.ip.att.net [12.122.11.154]
 11   210 ms   221 ms   210 ms  gar2-p360.la2ca.ip.att.net [12.123.28.169]
 12   211 ms   220 ms   210 ms  12.127.139.82
 13   210 ms *  220 ms  vlan1-mdr-lan-access2.mdr.softaware.net [209.85.0.11]
 14   210 ms   220 ms   221 ms  onion.valueclick.com [209.85.157.220]



search.cpan.org 198.246.0.28


[snip]
  5   151 ms   160 ms   160 ms  dt-gw.wswdc.ip.att.net [194.25.6.234]
  6   151 ms   160 ms   160 ms  12.122.11.233
  7   170 ms   181 ms   210 ms  tbr1-cl4.sl9mo.ip.att.net [12.122.10.30]
  8   170 ms   170 ms   171 ms  gbr1-p10.sl9mo.ip.att.net [12.122.11.98]
  9   170 ms   171 ms   180 ms  ar13-p310.sl9mo.ip.att.net [12.123.24.241]
 10   171 ms   180 ms   180 ms  12.119.206.62
 11   171 ms   170 ms   180 ms  gargoyle.webster.edu [198.246.0.28]




-- 

*
* VIRTUALITAS Inc.   *  *
**  *
* European Consultant Office *  http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*




Re: [OT] CPAN hacked?

2002-03-26 Thread Robin Berjon

On Tuesday 26 March 2002 14:37, Ernest Lergon wrote:
 Hi,

 is http://search.cpan.org hacked?
 Enclosed two traceroutes FYI.

 cpan.org 209.85.157.220
 ---

 [snip]
 [209.85.0.11] 14   210 ms   220 ms   221 ms  onion.valueclick.com
 [209.85.157.220]

 search.cpan.org 198.246.0.28
 

 [snip]
  11   171 ms   170 ms   180 ms  gargoyle.webster.edu [198.246.0.28]

No, it was most likely a misconfiguration that happened temporarily after 
Elaine updated search.cpan with a sexy box from Sun (thanks both!). 
gargoyle.webster.edu is a valid address for search.cpan.

-- 
___
Robin Berjon [EMAIL PROTECTED] -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
---
Oops. My Brain just hit a bad sector.




[OT] activating multimedia files in cgi-bin

2002-03-26 Thread Ernest Lergon

Daniel Jonda wrote:
 
 http://www.flyerfabrik.de/cgi-bin/gallery/gallery.cgi
 
See

http://httpd.apache.org/docs/mod/mod_alias.html#scriptalias

It is a very bad idea to place content below /cgi-bin.

Everything what is called below /cgi-bin is interpreted as a skript -
apache want's to run it, as Luciano said correctly.

E.g.:

If I call your skript with Netscape (Stylesheets on) I receive an
internal server error for this address:

http://www.flyerfabrik.de/cgi-bin/gallery/skins/default/styles.css

Turning it off, the script runs, but the images are not displayed. It's
the same as above:

http://www.flyerfabrik.de/cgi-bin/gallery/skins/categoryfolder.gif

gives 500 Internal server error.

So relocate your stuff.

Ernest


P.S.: This is OT, IMHO.


-- 

*
* VIRTUALITAS Inc.   *  *
**  *
* European Consultant Office *  http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*




[OT] CPAN hacked?

2002-03-26 Thread Ernest Lergon

Hi,

is http://search.cpan.org hacked?

A Chaos titled page with a baby-photo saying Question everything is displayed.

Enclosed two traceroutes FYI.

Ernest



cpan.org 209.85.157.220
---

[snip]
  5   160 ms   150 ms   161 ms  dt-gw.wswdc.ip.att.net [194.25.6.234]
  6   160 ms   161 ms   160 ms  12.122.11.233
  7   170 ms   180 ms   180 ms  tbr1-cl4.sl9mo.ip.att.net [12.122.10.30]
  8   180 ms   190 ms   171 ms  tbr2-p012401.sl9mo.ip.att.net [12.122.9.142]
  9 *** Timeout
 10   210 ms   211 ms   220 ms  gbr5-p40.la2ca.ip.att.net [12.122.11.154]
 11   210 ms   221 ms   210 ms  gar2-p360.la2ca.ip.att.net [12.123.28.169]
 12   211 ms   220 ms   210 ms  12.127.139.82
 13   210 ms *  220 ms  vlan1-mdr-lan-access2.mdr.softaware.net [209.85.0.11]
 14   210 ms   220 ms   221 ms  onion.valueclick.com [209.85.157.220]



search.cpan.org 198.246.0.28


[snip]
  5   151 ms   160 ms   160 ms  dt-gw.wswdc.ip.att.net [194.25.6.234]
  6   151 ms   160 ms   160 ms  12.122.11.233
  7   170 ms   181 ms   210 ms  tbr1-cl4.sl9mo.ip.att.net [12.122.10.30]
  8   170 ms   170 ms   171 ms  gbr1-p10.sl9mo.ip.att.net [12.122.11.98]
  9   170 ms   171 ms   180 ms  ar13-p310.sl9mo.ip.att.net [12.123.24.241]
 10   171 ms   180 ms   180 ms  12.119.206.62
 11   171 ms   170 ms   180 ms  gargoyle.webster.edu [198.246.0.28]




-- 

*
* VIRTUALITAS Inc.   *  *
**  *
* European Consultant Office *  http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*




Re: [OT] CPAN hacked?

2002-03-26 Thread Ernest Lergon

Sorry,

must have been a problem with a hidden proxy of my ISP or something. I
did'nt tell my browser to use any proxy.

It's all working again.

Please calm down ;-))

Ernest



-- 

*
* VIRTUALITAS Inc.   *  *
**  *
* European Consultant Office *  http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*




Problems after an upgrade...

2002-03-26 Thread Jose Ortiz





I had mod_perl installed and working in apache well until a few days ago. I think

that after an upgrade to apache the problems began. This is on the RedHat 7.2 OS.



The problem is that when I start the apache's daemon it gives me the [ok] check

mark, but when I check the status it writes me the following error:

httpd dead but subsys locked



And if I run the httpd from the command line it writes:

Invalid command 'PerlRequire', perhaps mis-spelled or defined by a module not

included in the server configuration.



The module (mod_perl) is installed. And was working...



I had tried a lot of things to fix the problem but without success.



Any suggestions please let me know!



Thanks in advance:

--
Jose R. Ortiz Ubarri
Cs. Student  Programmer



RE: Problems after an upgrade...

2002-03-26 Thread Jonathan M. Hollin

I had mod_perl installed and working in apache well until a few days
ago. I think
that after an upgrade to apache the problems began. This is on the
RedHat 7.2 OS.

Yep - I had the same problem.  What I discovered was that the RH update
had installed a new instance of Apache and started it!

At the prompt, stop httpd with:  apachectl stop

Then restart your original Apache with:  /usr/local/apache/bin/apachectl
start (path may be different on your system, although I doubt it with RH
7.2)

Hope this helps...


Jonathan M. Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypug.pm.org/  --  Temporarily off-line
http://wypug.digital-word.com/




Re: Apache::Session

2002-03-26 Thread Jeffrey W. Baker

On Mon, 2002-03-25 at 15:44, Stathy G. Touloumis wrote:
 Has anyone ran into issues with data being written to the data source using
 Apache::Session::Store::DB_File and Apache::Session::Lock::File?  We are
 running into a unique instance where a value is not being saved to the
 session store at a certain point through a workflow.  There are multiple
 frames which are making requests but only one frame makes the request to the
 server which runs code to write to the Session store.  We do have
 KeepAlive's enabled so I don't think there should be any contention issues
 when attempting to write to the store.  Nevertheless this still seems like
 the only reason this might be happening.
 
 Apache 1.3.22
 mod_perl 1.26
 Apache::Session 1.54

Could you give a little more detail please?  Lots of people have lots of
problems with Apache::Session, but it always comes down to not
destroying Session objects.

-jwb




mod_perl install problem

2002-03-26 Thread Avnish Pundir

Hi,
As per description given in http://perl.apache.org/distributions.html page,
I tried installing mod_perl from
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer. I was able to
install mod_perl using PPM but as mentioned in above page about copying
mod_perl.so in apache/module directory, I am not able to see it in my
apache/module directory. I am using Win2k, Apache 1.3.24. I am not running
apache as service. I guess post-installation script is looking for any
variable or something alike which I am not having in my system variables.
Could any one please tell me what should I do in order to get it installed.

I tried copying mod_perl.so from
ftp://theoryx5.uwinnipeg.ca/pub/other/perl-win32-bin-0.7.exe but when I load
the library in httpd file I get error
specified procedure could not be found. Any help would be greatly
appreciated.

Thanks
Avnish





RE: Apache::Session

2002-03-26 Thread Stathy G. Touloumis

Thanks for responding . . .

Not sure what else you need.  Destroying session objects?  Do you mean to
untie the session $obj?  This is done at the end of each request via untie
( untie(%$obj) ).  I have noticed behavior where when attempting to delete a
session object ( tied(%$obj)-delete ) I get a 'false' value returned which
I cannot figure out why.

  Has anyone ran into issues with data being written to the data
 source using
  Apache::Session::Store::DB_File and Apache::Session::Lock::File?  We are
  running into a unique instance where a value is not being saved to the
  session store at a certain point through a workflow.  There are multiple
  frames which are making requests but only one frame makes the
 request to the
  server which runs code to write to the Session store.  We do have
  KeepAlive's enabled so I don't think there should be any
 contention issues
  when attempting to write to the store.  Nevertheless this still
 seems like
  the only reason this might be happening.
 
  Apache 1.3.22
  mod_perl 1.26
  Apache::Session 1.54

 Could you give a little more detail please?  Lots of people have lots of
 problems with Apache::Session, but it always comes down to not
 destroying Session objects.




How to get two perl namespaces in apache

2002-03-26 Thread Thomas K. Burkholder

Hi there-

Apologies if this gets sent twice - I sent a message yesterday, but it 
seems to have vanished into the ether.

I'd like to run the production server of my mod_perl project 
(http://www.areaj.org/areaj) on the same machine as my development 
server.  Clearly they have the same module names so I have to somehow 
run them in two different environments - I don't think running them on 
two different virtual servers is going to do it, right?  Doesn't apache 
just start one perl runtime?  Please tell me if I'm mistaken about 
that.

So, I guess I'm wondering if there's an easy way to have two completely 
separate apache configurations running on the same machine (listening on 
different ports obviously).

Any help greatly appreciated.

Thanks,

//Thomas
Thomas K. Burkholder




Re: How to get two perl namespaces in apache

2002-03-26 Thread ___cliff rayman___


Thomas K. Burkholder wrote:

 run them in two different environments - I don't think running them on
 two different virtual servers is going to do it, right?  Doesn't apache
 just start one perl runtime?  Please tell me if I'm mistaken about

there is only one interpreter, so running a module with the same name
on two different virtual servers is not going to work.

 So, I guess I'm wondering if there's an easy way to have two completely
 separate apache configurations running on the same machine (listening on
 different ports obviously).

sure. just leave the regular config file, then build something like:
httpd_dev.conf

change both the Listen and Port directives to an alternate port, and then
start with:
httpd -c httpd_dev.conf

i haven't tried this exact scenario myself, but it should work without a problem.

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/





Re: How to get two perl namespaces in apache

2002-03-26 Thread Drew Taylor

Thomas,

You can run seperate environments if your coding doesn't reference any hard 
coded paths. I just setup a dev server at my new job and do exactly what 
you want. All you have to do is add a use lib qw(/path/to/modules); in 
your startup.pl or make sure the PERL5LIB environment var is set. This can 
be done w/ PerlSetVar /your/path/here or setting it for the user apache 
is running as. HTH.

Drew

At 11:16 AM 3/26/02 -0800, Thomas K. Burkholder wrote:
Hi there-

Apologies if this gets sent twice - I sent a message yesterday, but it 
seems to have vanished into the ether.

I'd like to run the production server of my mod_perl project 
(http://www.areaj.org/areaj) on the same machine as my development 
server.  Clearly they have the same module names so I have to somehow run 
them in two different environments - I don't think running them on two 
different virtual servers is going to do it, right?  Doesn't apache just 
start one perl runtime?  Please tell me if I'm mistaken about that.




Re: How to get two perl namespaces in apache

2002-03-26 Thread Ernest Lergon

Thomas K. Burkholder wrote:
 
 So, I guess I'm wondering if there's an easy way to have two completely
 separate apache configurations running on the same machine (listening on
 different ports obviously).
 

Hi Thomas,

just throwing a glance I found:

http://thingy.kcilink.com/modperlguide/modules/Apache_PerlVINC_Allows_Module.html

Maybe someone here has experience with it.

More tips on

http://thingy.kcilink.com/modperlguide/porting/Name_collisions_with_Modules_and.html

and in this discussion:

http://www.mail-archive.com/modperl@apache.org/msg24564.html

Ernest


-- 

*
* VIRTUALITAS Inc.   *  *
**  *
* European Consultant Office *  http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*




Re: How to get two perl namespaces in apache

2002-03-26 Thread Perrin Harkins

Ernest Lergon wrote:
 just throwing a glance I found:
 
 http://thingy.kcilink.com/modperlguide/modules/Apache_PerlVINC_Allows_Module.html

Not a good idea for production use.  It will slow things down.  Handy 
for development with multiple projects using separate virtual hosts though.

- Perrin




Apache build problem on Windows

2002-03-26 Thread Pete Kelly

I get the following errors when trying to build from
command line:

C:\mod_perl-1.26perl Makefile.PL
APACHE_SRC=\Apache_1.3.23 INSTALL_DLL=\Apache\
mod_perl
PerlDispatchHandler.enabled
PerlChildInitHandlerenabled
PerlChildExitHandlerenabled
PerlPostReadRequestHandler..enabled
PerlTransHandlerenabled
PerlHeaderParserHandler.enabled
PerlAccessHandler...enabled
PerlAuthenHandler...enabled
PerlAuthzHandlerenabled
PerlTypeHandler.enabled
PerlFixupHandlerenabled
PerlHandler.enabled
PerlLogHandler..enabled
PerlInitHandler.enabled
PerlCleanupHandler..enabled
PerlRestartHandler..enabled
PerlStackedHandlers.enabled
PerlMethodHandlers..enabled
PerlDirectiveHandlers...enabled
PerlTableApienabled
PerlLogApi..enabled
PerlUriApi..enabled
PerlUtilApi.enabled
PerlFileApi.enabled
PerlConnectionApi...enabled
PerlServerApi...enabled

Where is your Apache/modules directory? (q to quit)
[\Apache\modules]
Can't open s/sub mod_perl::hooks.*/sub mod_perl::hooks
{ qw(PerlDispatchHandler
PerlChildInitHandler PerlChildExitHandler
PerlPostReadRequestHandler PerlTransHa
ndler PerlHeaderParserHandler PerlAccessHandler
PerlAuthenHandler PerlAuthzHandl
er PerlTypeHandler PerlFixupHandler PerlHandler
PerlLogHandler PerlInitHandler P
erlCleanupHandler PerlRestartHandler
PerlStackedHandlers PerlMethodHandlers Perl
DirectiveHandlers PerlTableApi PerlLogApi PerlUriApi
PerlUtilApi PerlFileApi Per
lConnectionApi PerlServerApi) }/: No such file or
directory.
Edit of lib/mod_perl_hooks.pm failed

Help!!! GREATLY appreciated.

Pete

__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/



Re: mod_perl install problem

2002-03-26 Thread Randy Kobes

On Tue, 26 Mar 2002, Avnish Pundir wrote:

 Hi,
 As per description given in http://perl.apache.org/distributions.html page,
 I tried installing mod_perl from
 http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer. I was able to
 install mod_perl using PPM but as mentioned in above page about copying
 mod_perl.so in apache/module directory, I am not able to see it in my
 apache/module directory. I am using Win2k, Apache 1.3.24. I am not running
 apache as service. I guess post-installation script is looking for any
 variable or something alike which I am not having in my system variables.
 Could any one please tell me what should I do in order to get it installed.

I've heard some beta ppm clients don't have the ability
yet to run post-installation scripts.

 I tried copying mod_perl.so from
 ftp://theoryx5.uwinnipeg.ca/pub/other/perl-win32-bin-0.7.exe but when I load
 the library in httpd file I get error
 specified procedure could not be found. Any help would be greatly
 appreciated.

The mod_perl.so in that distribution most probably isn't
compatible with your apache version. What you could do is
get the file mod_perl-1.26_1.3.23.tar.gz from
   http://theoryx5.uwinnipeg.ca/ppmpackages/x86/
which, when unpacked, will contain a mod_perl.so file
(plus a blib/ subdirectory). Copy this mod_perl.so to
your Apache modules, and see if that works (this one
is built against apache_1.3.23, which I think will work
against 1.3.24 - if not, I'm going to update it shortly).

best regards,
randy kobes




Re: Accessing Apache master process pid

2002-03-26 Thread Jon Jensen

On Wed, 20 Mar 2002, Geoffrey Young wrote:

   Jon Jensen wrote:
   
Within mod_perl, I would like to know the pid of the master Apache daemon,
 
 well, here's one other way:
 
 Perl
   $Apache::Server::SaveConfig = 1;
   $PidFile = 'logs/httpd.pid';
 /Perl
 
 PerlInitHandler 'sub { warn The parent pid file is: , \
shift-server_root_relative($Apache::ReadConfig::PidFile)}'
 
 yeilds:
 The parent pid file is: /usr/local/apache/logs/httpd.pid at (eval 312)
 line 1.
 
 if you really need access to ap_pid_fname() that looks easy enough,
 but justification for needing it would help doug make the
 architectural decision whether to include it or not in core.

My main motivation is the Don't Repeat Yourself principle -- I'd like to 
be able to find out the name of the pidfile without duplicating its name 
and location anywhere in the configuration, and since Apache already knows 
it, I can't think of a reason mod_perl shouldn't expose it.

But either way, life will go on. :)

Jon




Re: Apache build problem on Windows

2002-03-26 Thread Stas Bekman

Pete Kelly wrote:
 I get the following errors when trying to build from
 command line:
 
 C:\mod_perl-1.26perl Makefile.PL
 APACHE_SRC=\Apache_1.3.23 INSTALL_DLL=\Apache\
 mod_perl
 PerlDispatchHandler.enabled
 PerlChildInitHandlerenabled
 PerlChildExitHandlerenabled
 PerlPostReadRequestHandler..enabled
 PerlTransHandlerenabled
 PerlHeaderParserHandler.enabled
 PerlAccessHandler...enabled
 PerlAuthenHandler...enabled
 PerlAuthzHandlerenabled
 PerlTypeHandler.enabled
 PerlFixupHandlerenabled
 PerlHandler.enabled
 PerlLogHandler..enabled
 PerlInitHandler.enabled
 PerlCleanupHandler..enabled
 PerlRestartHandler..enabled
 PerlStackedHandlers.enabled
 PerlMethodHandlers..enabled
 PerlDirectiveHandlers...enabled
 PerlTableApienabled
 PerlLogApi..enabled
 PerlUriApi..enabled
 PerlUtilApi.enabled
 PerlFileApi.enabled
 PerlConnectionApi...enabled
 PerlServerApi...enabled
 
 Where is your Apache/modules directory? (q to quit)
 [\Apache\modules]
 Can't open s/sub mod_perl::hooks.*/sub mod_perl::hooks
 { qw(PerlDispatchHandler
 PerlChildInitHandler PerlChildExitHandler
 PerlPostReadRequestHandler PerlTransHa
 ndler PerlHeaderParserHandler PerlAccessHandler
 PerlAuthenHandler PerlAuthzHandl
 er PerlTypeHandler PerlFixupHandler PerlHandler
 PerlLogHandler PerlInitHandler P
 erlCleanupHandler PerlRestartHandler
 PerlStackedHandlers PerlMethodHandlers Perl
 DirectiveHandlers PerlTableApi PerlLogApi PerlUriApi
 PerlUtilApi PerlFileApi Per
 lConnectionApi PerlServerApi) }/: No such file or
 directory.
 Edit of lib/mod_perl_hooks.pm failed


Hmm, this looks related to the -spi.bak bug reported earlier. Try this 
patch:

http://marc.theaimsgroup.com/?l=apache-modperlm=101682366719414w=2

-- 


__
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: mod_perl install problem

2002-03-26 Thread Avnish Pundir

Yes it's working. Thanks Randy.
-Avnish
- Original Message -
From: Randy Kobes [EMAIL PROTECTED]
To: Avnish Pundir [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 11:20 PM
Subject: Re: mod_perl install problem


On Tue, 26 Mar 2002, Avnish Pundir wrote:

 Hi,
 As per description given in http://perl.apache.org/distributions.html
page,
 I tried installing mod_perl from
 http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer. I was able
to
 install mod_perl using PPM but as mentioned in above page about copying
 mod_perl.so in apache/module directory, I am not able to see it in my
 apache/module directory. I am using Win2k, Apache 1.3.24. I am not running
 apache as service. I guess post-installation script is looking for any
 variable or something alike which I am not having in my system variables.
 Could any one please tell me what should I do in order to get it
installed.

I've heard some beta ppm clients don't have the ability
yet to run post-installation scripts.

 I tried copying mod_perl.so from
 ftp://theoryx5.uwinnipeg.ca/pub/other/perl-win32-bin-0.7.exe but when I
load
 the library in httpd file I get error
 specified procedure could not be found. Any help would be greatly
 appreciated.

The mod_perl.so in that distribution most probably isn't
compatible with your apache version. What you could do is
get the file mod_perl-1.26_1.3.23.tar.gz from
   http://theoryx5.uwinnipeg.ca/ppmpackages/x86/
which, when unpacked, will contain a mod_perl.so file
(plus a blib/ subdirectory). Copy this mod_perl.so to
your Apache modules, and see if that works (this one
is built against apache_1.3.23, which I think will work
against 1.3.24 - if not, I'm going to update it shortly).

best regards,
randy kobes






[ANNOUNCE] PHP::Session 0.06 Apache::Session::PHP

2002-03-26 Thread Tatsuhiko Miyagawa

Announcing the update of PHP::Session and yet another module of nightmare.

You can download 'em from http://bulknews.net/lib/archives/ and CPAN.

NAME
Apache::Session::PHP - glues Apache::Session with PHP::Session

SYNOPSIS
  use Apache::Session::PHP;

  tie %session, 'Apache::Session::PHP', $sid, {
  SavePath = '/var/sessions',
  };

DESCRIPTION
Apache::Session::PHP is an adapter of Apache::Session for PHP::Session.
It uses following combination of straregies:

Generate: MD5
PHP4 session also uses 32bit session-id, generated by MD5 of random
string. So MD5 (default) generation would fit.

Serialize: PHP
uses PHP::Session::Serializer::PHP.

Lock: Null
PHP4 uses exclusive flock for session locking. In Apache::Session,
we use Null for locking and Store module executes flock on opening
the session file.

Store: PHP
similarto File store, but file naming scheme is slightly different.

NOTE
PHP does NOT have distinction between hash and array. Thus PHP::Session
restores PHP *array* as Perl *hash*.

  Perl  =  PHP  = Perl
  arrayarrayhash

Thus if you store array in sessions, what'll come back is hash.

AUTHOR
Tatsuhiko Miyagawa [EMAIL PROTECTED]

This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

SEE ALSO
the Apache::Session manpage, the PHP::Session manpage



-- 
Tatsuhiko Miyagawa



Getting configuration into a filter

2002-03-26 Thread Dan McGuirk

Hi,

I'm writing a filter using modperl-2.0, and trying to figure out how to
get per-directory configuration information passed into it.  I've tried
both PerlSetVar and PerlSetEnv, but nothing seems to be getting
through.  Below is a section of the httpd.conf and the code.

The attempt to reference dir_config gives:

Can't locate object method dir_config via package Apache::Filter
(perhaps you forgot to load Apache::Filter?) at {path}/RewriteLinks.pm
line 117. 

The environment variable has no value.

Thanks for any help you can provide.


Location /filtered 
  PerlOutputFilterHandler RewriteLinks 
  PerlOptions +SetupEnv 
  PerlSetVar CurrentDirectory /foobie 
  PerlSetEnv SomeVar SomeValue 
/Location 

sub handler { 
my $filter = shift; 
 
#$filter-print(!-- current directory:  .
$filter-dir_config-get(CurrentDirectory) .  --\
\n); 
$filter-print(!-- SomeVar is  . $ENV{'SomeVar'} . --\n); 
}



Re: Apache::DBI or What ?

2002-03-26 Thread John D Groenveld

 There are databases that allow you to change the current user without 
 reconnecting.  In fact someone posted a module to do this a while back, 
 but I can't remember which database it was for.  Seems like it was 
 Sybase or Informix.
Jeff Horn posted this a couple years ago either here or @ dbi-users

# Hacked Up Version of Apache::DBI
#
# Hacking by: Jeff Horn ([EMAIL PROTECTED])
#
# Purpose: This version of Apache::DBI maintains a SINGLE persistent
#  connection to each database.  When the user changes on 
#  subsequent connect calls, the DBI-func( ., ., 'reauthtenticate')
#  is called to quickly authenticate the new user on the existing
#  connection.

I've used it for a few projects, I haven't really follow how changes over
the last year to Edmund Mergl's Apache::DBI or Tim Bunce's DBI may have
affected it.

I recall one problem being when using different attributes to connect 
methods.

Have fun.
John
[EMAIL PROTECTED]




Re: Getting configuration into a filter

2002-03-26 Thread Stas Bekman

Dan McGuirk wrote:
 Hi,
 
 I'm writing a filter using modperl-2.0, and trying to figure out how to
 get per-directory configuration information passed into it.  I've tried
 both PerlSetVar and PerlSetEnv, but nothing seems to be getting
 through.  Below is a section of the httpd.conf and the code.
 
 The attempt to reference dir_config gives:
 
 Can't locate object method dir_config via package Apache::Filter
 (perhaps you forgot to load Apache::Filter?) at {path}/RewriteLinks.pm
 line 117. 
 
 The environment variable has no value.
 
 Thanks for any help you can provide.
 
 
 Location /filtered 
   PerlOutputFilterHandler RewriteLinks 
   PerlOptions +SetupEnv 
   PerlSetVar CurrentDirectory /foobie 
   PerlSetEnv SomeVar SomeValue 
 /Location 
 
 sub handler { 
 my $filter = shift; 
  
 #$filter-print(!-- current directory:  .
 $filter-dir_config-get(CurrentDirectory) .  --\
 
\n); 
 
 $filter-print(!-- SomeVar is  . $ENV{'SomeVar'} . --\n); 
 }

dir_config is an Apache::RequestRec method, you need to do:

$filter-r-dir_config-get(CurrentDirectory);

you may need to require Apache::RequestUtil if it wasn't loaded yet.

As of this moment the tests in t/ are your best source for figuring out 
how to do things with new features.

__
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: Apache::DBI or What ?

2002-03-26 Thread Eric Frazier

Hi,

If you have any idea where to find this code I would be thankful. I can only
find this..
 
http://aspn.activestate.com/ASPN/Mail/Message/perl-DBI/298774

Thanks,

Eric 


At 04:47 PM 3/26/02 -0500, John D Groenveld wrote:
 There are databases that allow you to change the current user without 
 reconnecting.  In fact someone posted a module to do this a while back, 
 but I can't remember which database it was for.  Seems like it was 
 Sybase or Informix.
Jeff Horn posted this a couple years ago either here or @ dbi-users

# Hacked Up Version of Apache::DBI
#
# Hacking by: Jeff Horn ([EMAIL PROTECTED])
#
# Purpose: This version of Apache::DBI maintains a SINGLE persistent
#  connection to each database.  When the user changes on 
#  subsequent connect calls, the DBI-func( ., ., 'reauthtenticate')
#  is called to quickly authenticate the new user on the existing
#  connection.

I've used it for a few projects, I haven't really follow how changes over
the last year to Edmund Mergl's Apache::DBI or Tim Bunce's DBI may have
affected it.

I recall one problem being when using different attributes to connect 
methods.

Have fun.
John
[EMAIL PROTECTED]


http://www.kwinternet.com/eric
(250) 655 - 9513 (PST Time Zone)

Learn about the net, not the .Net! 







cvs commit: modperl/t/net/perl util.pl

2002-03-26 Thread dougm

dougm   02/03/26 06:52:28

  Modified:.Changes
   t/net/perl util.pl
  Log:
  Submitted by:   Tatsuhiko Miyagawa
  Reviewed by:  dougm
  fix bug in modules/util test
  
  Revision  ChangesPath
  1.640 +3 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.639
  retrieving revision 1.640
  diff -u -r1.639 -r1.640
  --- Changes   25 Mar 2002 18:45:23 -  1.639
  +++ Changes   26 Mar 2002 14:52:28 -  1.640
  @@ -10,6 +10,9 @@
   
   =item 1.26_01-dev
   
  +fix bug in modules/util test
  +[Tatsuhiko Miyagawa [EMAIL PROTECTED]]
  +
   Adjust the mailling list addresses
   's|\@apache\.org|\@perl.apache.org|' [Stas Bekman [EMAIL PROTECTED]]
   
  
  
  
  1.14  +1 -1  modperl/t/net/perl/util.pl
  
  Index: util.pl
  ===
  RCS file: /home/cvs/modperl/t/net/perl/util.pl,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- util.pl   25 Mar 2002 18:45:23 -  1.13
  +++ util.pl   26 Mar 2002 14:52:28 -  1.14
  @@ -152,7 +152,7 @@
 Perl: 21 secs (20.57 usr  0.14 sys = 20.71 cpu) 
   =cut
   
  -my $date_str = Sat, 18 Jul 1998 08:38:00 -0700;
  +my $date_str = Sat, 18 Jul 1998 08:38:00 GMT;
   
   test ++$i, Apache::Util::parsedate($date_str);
   
  
  
  



cvs commit: modperl/Util Util.pm

2002-03-26 Thread dougm

dougm   02/03/26 06:56:15

  Modified:Util Util.pm
  Log:
  Submitted by: Eric Cholet, Robin Berjon
  Reviewed by:  dougm
  doc: Apache::Util::escape_html is only meant to escape US-ASCII text
  
  Revision  ChangesPath
  1.9   +4 -0  modperl/Util/Util.pm
  
  Index: Util.pm
  ===
  RCS file: /home/cvs/modperl/Util/Util.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Util.pm   4 Mar 2000 20:55:47 -   1.8
  +++ Util.pm   26 Mar 2002 14:56:15 -  1.9
   -68,6 +68,10 
   
my $esc = Apache::Util::escape_html($html);
   
  +This function will correctly escape US-ASCII output. If you are using
  +a different character set such as UTF8, or need more control on
  +the escaping process, use HTML::Entities.
  +
   =item escape_uri
   
   This function replaces all unsafe characters in the $string with their