Re: Apache::DBI crashes apache-mod_ssl-1.3.9.2.4.6

1999-01-02 Thread Stephane Benoit

I have compiled mod_perl statically and the rest as dso's and i have no more problems
No need to recompile perl unless you want perl threads.
RH61, Apache 1.3.9 / Mod_ssl 246 / Modperl 1.21 / Mod_php 3012

Cheers

Nick Urbanik wrote:

 Dear Edmund,

 thank you for taking the time to reply.

 Edmund Mergl wrote:

  in case you are using the stock rpm's fo apache and mod_perl, the solution is
  rather simple:
 
  compile apache with mod_perl from the sources and install just the binary
  httpd (you can rename it as httpd_modperl).
  That's all.

 So you mean that I should compile mod_perl together statically with Apache-mod_ssl,
 and that using apxs will not work?

 I compiled both packages myself from RPMs, but on my home machine.  I think I
 understand the RPM .spec files reasonably well.  I installed them on the machine
 here at work.  I will try compiling everything on the target machine.  Perhaps
 I need to recompile Perl too?

 --
 Nick Urbanik, Dept. of Electrical  Communications Engineering
 Hong Kong Institute of Vocational Education (Tsing Yi)
 email: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Tel:   (852) 2436 8660, (825) 2436 8674   Fax: (852) 2436 8643
 pgp ID: 7529555D fingerprint: 53 B6 6D 73 52 EE 1F EE EC F8 21 98 45 1C 23 7B



Performance query of DBD::Proxy

1999-01-02 Thread Peter Galbavy

I guess this isn't exactly the right place, but if anyone knows about
the real world and DBD::Proxy with Apache it's you people...

I have been working with a client who has looked at using Intel
platforms (with Linux cwas the initial alternative platform) as a
backend modperl/Oracle web engine. They have been running on Solaris
for years. As part of a related project they have used DBD::Proxy
and DBI::ProxyServer to reach a "firewalled" DB. Hence the interest.

I am curious if anyone has comments on the performance of using:

DBD::Proxy - DBI::ProxyServer - DBD::Oracle - Oracle

-- host1 --  host 2 -- -- host3 -
or
-- host1 -- -- host2 --

as opposed to

DBD::Oracle  -   Oracle
-- host1 -- -- host2 --

?

The reason is that at the moment their selection of base OS is
dependent on having Oracle (or whatever) client libraries, and I would
like to be able to widen their scope in terms of benchmarking with
other OSes. Asking here is part of the first steps ...

This solution, apart from offering a wider choice of platform, may
also help focus resources and reliability issues on a functional /
application software basis, rather than a very simple client-server
model. (Even though both are client-server...)

TIA.

Regards,
-- 
Peter Galbavy
Knowledge Matters Ltd
http://www.knowledge.com/



make fails

1999-01-02 Thread Eva Neuberger

Hallo,
I'm trying to install mod_perl_1.21 with apache 1.36 perl 5.005_03
and Linux Kernel 2.2.10

I follow the instructions in INSTALL.apaci

perl Makefile.PL APACHE_SRC=../apache_1.3.6/src DO_HTTPD=1
PREP_HTTPD=1 USE_APACI=1 EVERYTHING=1

Everything is ok, then typing make
. 
cc -c  -Dbool=char -DHAS_BOOL -I/usr/local/include -O2 -pipe   
-DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fpic
-I/usr/lib/perl5/5.00503/i586-linux/CORE  Leak.c 
In file included from Leak.xs:12: 
/usr/lib/perl5/5.00503/i586-linux/CORE/perl.h:2546: redefinition of
`union semun' 
make[1]: *** [Leak.o] Error 1 
make[1]: Leaving directory`/usr/src/mod_perl-1.21/Leak' 
make: *** [subdirs] Error 2

and with
perl Makefile.PL 
APACHE_SRC=../apache_1.3.6/src APACHE_PREFIX=/usr/local/apache 
DO_HTTPD=1 USE_APACI=1 EVERYTHING=1

I've got
cc -c -I../..  -I/usr/lib/perl5/5.00503/i586-linux/CORE 
-I../../os/unix -I../../include   -DLINUX=2 -DMOD_PERL -DUSE_PERL_SSI
-Dbool=char -DHAS_BOOL -I/usr/local/include -DUSE_HSREGEX
`../../apaci` mod_include.c In file included from
../../modules/perl/mod_perl.h:41,
 from mod_include.c:85:
/usr/lib/perl5/5.00503/i586-linux/CORE/perl.h:2546: redefinition of
`union semun' 
make[5]: *** [mod_include.o] Error 1 
make[4]: *** [all] Error 1 
make[3]: *** [subdirs] Error 1  
make[3]:Leaving directory`/usr/src/apache_1.3.6/src' 
make[2]: ***[build-std] Error 2 
make[2]: Leaving directory`/usr/src/apache_1.3.6' 
make[1]: ***[build] Error 2 
make[1]: Leaving directory`/usr/src/apache_1.3.6' 
make: *** [apaci_httpd] Error 2

the same "redefinition of union semun"
I've no idea, what's wrong.

Eva Neuberger



RE: Embperl 1.2b11 installation pb

1999-01-02 Thread Gerald Richter

 Hi,

  I've just installed 1.2b11 on RedHat 6.1 and everything went smoothly.
 Then
 I decided I want to play with sessions after all, installed
 Apache::Session 1.04
 and tried to reinstall Embperl - make test now fails with following
 error:

 Starting httpd...
 Test terminated with fatal error
 cat: test/tmp/httpd.pid: (is not file/directory)
 make: *** [test_dynamic] Error 9

Please send me the last 10 lines of test/tmp/test.err.log and your
test/conf/config.pl

Gerald



---
Gerald Richter  ecos electronic communication services gmbh
Internet - Infodatenbanken - Apache - Perl - mod_perl - Embperl

E-Mail: [EMAIL PROTECTED] Tel:+49-6133/925151
WWW:http://www.ecos.de  Fax:+49-6133/925152
---



XSSI parsing on CGI output

1999-01-02 Thread Martin A. Langhoff

hi list,

let's say I am populating form data (when serving the form) from a
few database fields. Now, I don't want to write embedded perl, and don't
want to embed HTML in the code, because there are a few designers and my
(the coder).
So I wrote an Include that calls the CGI. The CGI outputs XSSI
statements (declaring variables, mainly : the variables are the output
from the DB query). The problem, if you haven't guessed, is that the
XSSI directives are not being parsed.

Is there any way to accomplish this trick? Any alternative solution
you imagine/have?

Thanks!


martin
--
   - Martin Langhoff @ S C I M  Multimedia Technology -
- http://www.scim.net  | God is real until  -
- mailto:[EMAIL PROTECTED]  | declared integer   -




Re: Apache::DBI crashes apache-mod_ssl-1.3.9.2.4.6

1999-01-02 Thread Stephane Benoit

To do it yourself wich is probably the best way (no confilct with
existing perl etc...) :
* please forgive name errors (like tarballs and dir names) as I'm
writting from what i remeber when i did it *

1 get apache-mod_ssl-1.3.9.2.4.6-0.6.0.src.rpm (from
http://www.modssl.org)
2 get openssl-0.9.4.i386.rpm
3 get mod_perl1.21.tar.gz from cpan
4 rpm -ivh openssl-0.9.4.i386.rpm
5 rpm -ivh apache-mod_ssl-1.3.9.2.4.6-0.6.0.src.rpm
6 cd /usr/src/redhat/SPECS
7 rpm -bp apache-mod_ssl.spec
8 cd /usr/src/redhat/BUILD/apache-mod_ssl-1.3.9.2.4.6
9 tar xvzf mod_perl.1.21.tar.gz
10 cd mod_perl-1.21
11 perl Makefile.PL APACHE_SRC=../apache_1.3.9/src \
 DO_HTTPD=1 \
 USE_APACI=1 \
 PREP_HTTPD=1 \
 EVERYTHING=1 \
12 make
13 make install
14 cd ../mm-1.0.12/
15 ./configure --disable-shared
16 make
14 cd ../mod_ssl-2.4.6-1.3.9/
15 ./configure \
--with-perl=/usr/bin/perl \
--with-apache=../apache_1.3.9\
--with-ssl=SYSTEM \
--with-mm=../mm-1.0.12 \
--with-layout=RedHat \
--disable-rule=WANTHSREGEX \
--enable-module=all \
--enable-module=define \
--activate-module=src/modules/perl/libperl.a \
--enable-shared=max \
--disable-shared=perl \
--enable-suexec --suexec-caller=nobody \
--suexec-uidmin=500 --suexec-gidmin=500

16 make
17 make certificate (with whatever option is suitable to your config)
18 make install

You should be all set. (it took me some time to figure out how to do it
the proper way, I guess it's ok.)
If you use the standard config for mod_ssl don't forget to run apache as
: "httpd -DSSL"

Cheers,
Stef.

Remi Fasol wrote:

 hi there. can you point me to instructions for
 statically linking mod_perl to the redhat secure
 server? i'm pretty new at this and am not sure how to
 do it.

 i tried working from the .spec file but kept getting
 an error saying that i needed the bsafe libraries.
 however, i can't find them anywhere.

 thanks.
 remi

 --- Stephane Benoit [EMAIL PROTECTED] wrote:
  I have compiled mod_perl statically and the rest as
  dso's and i have no more problems
  No need to recompile perl unless you want perl
  threads.
  RH61, Apache 1.3.9 / Mod_ssl 246 / Modperl 1.21 /
  Mod_php 3012
 
  Cheers
 
  Nick Urbanik wrote:
 
   Dear Edmund,
  
   thank you for taking the time to reply.
  
   Edmund Mergl wrote:
  
in case you are using the stock rpm's fo apache
  and mod_perl, the solution is
rather simple:
   
compile apache with mod_perl from the sources
  and install just the binary
httpd (you can rename it as httpd_modperl).
That's all.
  
   So you mean that I should compile mod_perl
  together statically with Apache-mod_ssl,
   and that using apxs will not work?
  
   I compiled both packages myself from RPMs, but on
  my home machine.  I think I
   understand the RPM .spec files reasonably well.  I
  installed them on the machine
   here at work.  I will try compiling everything on
  the target machine.  Perhaps
   I need to recompile Perl too?
  
   --
   Nick Urbanik, Dept. of Electrical  Communications
  Engineering
   Hong Kong Institute of Vocational Education (Tsing
  Yi)
   email: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Tel:   (852) 2436 8660, (825) 2436 8674   Fax:
  (852) 2436 8643
   pgp ID: 7529555D fingerprint: 53 B6 6D 73 52 EE 1F
  EE EC F8 21 98 45 1C 23 7B
 
 

 =

 __
 Do You Yahoo!?
 Bid and sell for free at http://auctions.yahoo.com



mod_perl and friends on performancecomputing.com

1999-01-02 Thread Stas Bekman


Well, this is quite an old article (May 99), but I've just stumbled upon
it, while browsing the performancecomputing.com archives: 

 "Decreasing Your Site's World Wide Wait"
  http://www.performancecomputing.com/columns/web/9905.shtml

It's a very basic overview of existing improvements of mod_cgi...
Apache
Binary Evolution
FastCGI
Fast.Serv
mod_perl
NeoWebScript
nsapi_perl
PHP
tcl
tcl/java

Enjoy...

___
Stas Bekman  mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas  
Perl,CGI,Apache,Linux,Web,Java,PC at  www.singlesheaven.com/stas/TULARC
www.apache.org   www.perl.com  == www.modperl.com  ||  perl.apache.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: XSSI parsing on CGI output

1999-01-02 Thread Ken Williams

Check out Apache::SSI on CPAN.


[EMAIL PROTECTED] (Martin A. Langhoff) wrote:
hi list,

let's say I am populating form data (when serving the form) from a
few database fields. Now, I don't want to write embedded perl, and don't
want to embed HTML in the code, because there are a few designers and my
(the coder).
So I wrote an Include that calls the CGI. The CGI outputs XSSI
statements (declaring variables, mainly : the variables are the output
from the DB query). The problem, if you haven't guessed, is that the
XSSI directives are not being parsed.

Is there any way to accomplish this trick? Any alternative solution
you imagine/have?

Thanks!


martin
--
   - Martin Langhoff @ S C I M  Multimedia Technology -
- http://www.scim.net  | God is real until  -
- mailto:[EMAIL PROTECTED]  | declared integer   -



  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum




Re: Embperl

1999-01-02 Thread Eugene B. Byrganov

Gerald Richter wrote:

 
 
  How make $http_headers_out{'Location'} ,so as
 
   A HREF="edit.html?[+ [%fdat] +]" redirect /A
 
 
 I would try
 
 $url = "http://$ENV{SERVER_NAME}/path/to/edit.html?" ;
 while (($k, $v) = each (%fdat))
 {
 $url .= "$k=$v" ;
 }
 
 $http_headers_out{'location'} = $url ;
 
I am making too:

   $url="edit.html\?";
   foreach $i ( keys %fdat)
 {
 $_=$fdat{$i};
 s/([^a-zA-Z0-9-._])/uc sprintf("%%%02x",ord($1))/eg;
 $url.="$i=$_\";
 }
   $url.="lock=$lock";
  $http_headers_out{'Location'} = "$url"; 

But this don't good idea,
'A HREF="edit.html?[+ [%fdat] +]" redirect /A ' - more elegant.
 
Another quistion: how use 'struct tCharTrans Char2Url' in perl code 
for escaping any strings?
My be in TODO?


-- 

  ó ÎÁÉÌÕÞÛÉÍÉ ÐÏÖÅÌÁÎÉÑÍÉ, å×ÇÅÎÉÊ âÙÒÇÁÎÏ×.
  Best regards, Eugene Byrganov

  mailto:[EMAIL PROTECTED].
  work - http://www.inp.nsk.su/



RE: Embperl

1999-01-02 Thread Gerald Richter

  
  
   How make $http_headers_out{'Location'} ,so as
  
A HREF="edit.html?[+ [%fdat] +]" redirect /A
  
 
  I would try
 
  $url = "http://$ENV{SERVER_NAME}/path/to/edit.html?" ;
  while (($k, $v) = each (%fdat))
  {
  $url .= "$k=$v" ;
  }
 
  $http_headers_out{'location'} = $url ;
 
 I am making too:

$url="edit.html\?";
foreach $i ( keys %fdat)
  {
  $_=$fdat{$i};
  s/([^a-zA-Z0-9-._])/uc sprintf("%%%02x",ord($1))/eg;
  $url.="$i=$_\";
  }
$url.="lock=$lock";
   $http_headers_out{'Location'} = "$url";

 But this don't good idea,
 'A HREF="edit.html?[+ [%fdat] +]" redirect /A ' - more elegant.

 Another quistion: how use 'struct tCharTrans Char2Url' in perl code
 for escaping any strings?

You could only use it when you output data by writing

[- $escmode = 2 -]

but it's not possible to apply it to perl data

 My be in TODO?


I can put it on the TODO list, but there are other perl modules (CGI, LWP)
which can do the job for you, so I don't give it a very high priority

Gerald




 --

   ó ÎÁÉÌÕÞÛÉÍÉ ÐÏÖÅÌÁÎÉÑÍÉ, å×ÇÅÎÉÊ âÙÒÇÁÎÏ×.
   Best regards, Eugene Byrganov

   mailto:[EMAIL PROTECTED].
   work - http://www.inp.nsk.su/




Apache 1.3.9 Does not recognize mod_perl directives

1999-01-02 Thread Miguel Navarro

Apache 1.3.9
Mod_perl 1.21
Solaris 2.7

Having read Doug's comments about malloc issues with configuring mod_perl as a dso on 
solaris, I decided to compile mod_perl in statically. When I do a httpd -l,-L mod_perl 
appears to be compiled in and all the mod_perl directives are available. However when 
I run apache, I get errors " can 't find function/module PerlModule ...". This is the 
same for every other mod_perl directive. Any help would be great.

-Miguel Navarro
carclub.com 
 [EMAIL PROTECTED]




RE: mod_perl on Apache 2.0

1999-01-02 Thread Gerald Richter


 Perl threads have nothing to do with OS level threads.  They aren't
 native; they're part of the language itself and don't depend or rely
 on POSIX threads, native threads, or other such things.  In
 particular, Perl threading doesn't mean that Perl is thread safe.


Yes, Perl threads are not OS threads. I am not an thread expert, but Perl
threads depends on OS threads, so it maybe possible to "attach" a Perl
thread to an OS thread (sometime in the future, when Perl threads are
stable)

 What Doug has said we'll do, and what makes sense, is have a Perl
 interpreter in memory for each thread.  With Perl compiled with
 -DMULTIPLICITY, we can have multiple interpreters in a single
 process.  They will still benefit from code sharing and such in
 memory, but there will be per-thread overhead. Plus, AFAIK, no Perl
 distribution comes shipped with multiplicity, so we'll likely have to
 require Perl recompilation before mod_perl compilation.


This is the way to go for now. We can use -DMULTIPLICITY or -DPERL_OBJECT,
that doesn't matter, both will allocate a number of Perl interpreters and
they could be assign to a particular thread.

Gerald



Re: Embperl

1999-01-02 Thread Eugene B. Byrganov

Gerald Richter wrote:

  I am making too:
 
 $url="edit.html\?";
 foreach $i ( keys %fdat)
   {
   $_=$fdat{$i};
   s/([^a-zA-Z0-9-._])/uc sprintf("%%%02x",ord($1))/eg;
   $url.="$i=$_\";
   }



  Another quistion: how use 'struct tCharTrans Char2Url' in perl code
  for escaping any strings?
 
 I can put it on the TODO list, but there are other perl modules (CGI, LWP)
 which can do the job for you, so I don't give it a very high priority

Ok!

P.S. I search std. function for escaping, but don't found anywhere in 
perl modules. Only internal in CGI.pm I found this string 's/([^a-zA-Z0-9-._]) ...', 
but without possible to call function from my code.

-- 

  ó ÎÁÉÌÕÞÛÉÍÉ ÐÏÖÅÌÁÎÉÑÍÉ, å×ÇÅÎÉÊ âÙÒÇÁÎÏ×.
  Best regards, Eugene Byrganov

  mailto:[EMAIL PROTECTED].
  work - http://www.inp.nsk.su/



Re: Embperl

1999-01-02 Thread Geoffrey Crawshaw


 Gerald Richter wrote:
 
   I am making too:
  
  $url="edit.html\?";
  foreach $i ( keys %fdat)
{
$_=$fdat{$i};
s/([^a-zA-Z0-9-._])/uc sprintf("%%%02x",ord($1))/eg;
$url.="$i=$_\";
}
 
 
 
   Another quistion: how use 'struct tCharTrans Char2Url' in perl code
   for escaping any strings?
  
  I can put it on the TODO list, but there are other perl modules (CGI, LWP)
  which can do the job for you, so I don't give it a very high priority
 
 Ok!
 
 P.S. I search std. function for escaping, but don't found anywhere in 
 perl modules. Only internal in CGI.pm I found this string 's/([^a-zA-Z0-9-._]) ...', 
 but without possible to call function from my code.

Use the escape and unescape functions in CGI.pm to URL encode text
CGI::escape('text to escape');
CGI::unescape('text to unescape');

-- 
Geoff Crawshaw
CTO
TimeBills.com Inc.
[EMAIL PROTECTED]
http://www.timebills.com



Re: mod_perl on Apache 2.0

1999-01-02 Thread Jeffrey Baker

Matt Sergeant wrote:
 
 On Thu, 04 Nov 1999, Jeffrey Baker wrote:
  I'm assuming that Perl itself is reentrant, since it has been embedded
  in multithreaded environments before (IIS).  Hopefully someone can
  comment on that.
 
 This work was based on PERL_OBJECT support, which is currently only
 available on windows. It's a perl interpreter wrapped up in a C++ object so
 that the whole thing is reentrant. For 5.6 I believe a similar
 functionality but in C is being added (or is moving out of experimental
 mode) called MULTIPLICITY.

I believe -DMULTIPLICITY is already in 5.005_03.  Check "man perlembed".


   Now suppose we have more than one interpreter instance
   running at the same time.  This is feasible, but only if
   you used the -DMULTIPLICITY flag when building Perl.  By
   default, that sets PL_perl_destruct_level to 1.

   Let's give it a try:

#include EXTERN.h
#include perl.h

/* we're going to embed two interpreters */
/* we're going to embed two interpreters */

#define SAY_HELLO "-e", "print qq(Hi, I'm $^X\n)"

int main(int argc, char **argv, char **env)
{
PerlInterpreter
*one_perl = perl_alloc(),
*two_perl = perl_alloc();
char *one_args[] = { "one_perl", SAY_HELLO };
char *two_args[] = { "two_perl", SAY_HELLO };

perl_construct(one_perl);
perl_construct(two_perl);

perl_parse(one_perl, NULL, 3, one_args, (char **)NULL);
perl_parse(two_perl, NULL, 3, two_args, (char **)NULL);

perl_run(one_perl);
perl_run(two_perl);

perl_destruct(one_perl);
perl_destruct(two_perl);

perl_free(one_perl);
perl_free(two_perl);
}

-- 
Jeffrey W. Baker * [EMAIL PROTECTED]
Critical Path, Inc. * we handle the world's email * www.cp.net
415.808.8807



Re: Installation Problem with Apache::Session and Mason

1999-01-02 Thread Jeffrey Baker

[EMAIL PROTECTED] wrote:
 
 I'm having a problem setting up Apache::Session on
 one machine and not another, and I'm hoping that
 someone will recognize what I'm doing wrong.
 
 I'm using Mason to make the connection to
 the package when Apache starts up. On the problem
 server, the following happens on server start-up:
 
 starting httpd...
 Ambiguous use of read = resolved to "read" = at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 35.
 Ambiguous use of write = resolved to "write" = at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 35.
 Ambiguous use of {read} resolved to {"read"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 43.
 Ambiguous use of {write} resolved to {"write"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 44.
 Ambiguous use of {read} resolved to {"read"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 54.
 Ambiguous use of {write} resolved to {"write"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 61.
 Ambiguous use of {read} resolved to {"read"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 68.
 Ambiguous use of {write} resolved to {"write"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 74.
 Ambiguous use of {read} resolved to {"read"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 81.
 Ambiguous use of {read} resolved to {"read"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 85.
 Ambiguous use of {write} resolved to {"write"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 92.
 Ambiguous use of {write} resolved to {"write"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 96.
 Ambiguous use of {read} resolved to {"read"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 103.
 Ambiguous use of {write} resolved to {"write"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 106.
 Ambiguous use of {read} resolved to {"read"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 110.
 Ambiguous use of {write} resolved to {"write"} at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 111.

That is Perl being anal about the use of unquoted read and write as hash
keys.  I should probably fix this but it isn't fatal.

 The server does start, however. But when I try to access
 a page that uses the session hash, the following appears
 in the httpd error log:
 
 [Thu Nov  4 11:17:21 1999] [error] Permission denied at
 /usr/lib/perl5/site_perl/Apache/Session/SysVSemaphoreLocker.pm line
 64.

This is a different problem.  At some point someone other than the user
that your httpd runs as created the semaphore block that you are tyring
to use.  First, consult the ipcs and ipcrm man pages.  Then, as root,
remove the semaphore block that is causing the problem and allow the
httpd to recreate it as the nobody user.

-jwb

 I've checked the permissions on the module itself, the
 directory where the session files are stored, and the
 permissions of the owner of the httpd process. I've
 had no problem on another server, also running Linux
 2.0.35. All the corresponding PERL modules seem synched,
 as well as the Apache httpd binaries.
 
 Here is the script that is called (part of Mason's
 start up script called handler.pl):
 
 # This block of code can be enabled to create a session-hash that
   every
 # component can access.  This is useful for maintaining state
   across
 # multiple requests.  The Apache::Session module is required.
 #
 my %session;
 my $cookie = $r-header_in('Cookie');
 $cookie =~ s/SESSION_ID=(\w*)/$1/;
 tie %session, 'Apache::Session::File', $cookie, {'Directory' =
   '/tmp/session'};
 $r-header_out("Set-Cookie" =
   "SESSION_ID=$session{_session_id};") if ( !$cookie );
 
 # This creates a global called %session that is accessible in all
   components.
 # Feel free to rename this as needed.
 #
 local *HTML::Mason::Commands::session = \%session;
 
 $ah-handle_request($r);
 
 untie %HTML::Mason::Commands::session;
 
 This is Apache-Session-1.03 and HTML-Mason-0.72 on
 Apache 1.3.6.
 
 Thanks for any help/hints you can provide.
 
 Marc Kelly
 [EMAIL PROTECTED]

-- 
Jeffrey W. Baker * [EMAIL PROTECTED]
Critical Path, Inc. * we handle the world's email * www.cp.net
415.808.8807



RE: Embperl - Apache redirect

1999-01-02 Thread Gerald Richter


 Should there by any difference between using?:

 [-
pcsuri($_[0]), $rdrloc=$GWCe::pcsuri;
use Apache;
use Apache::Constants qw(REDIRECT);
$req_rec-header_out("Location" = $rdrloc);
$req_rec-status(REDIRECT);
exit;
 -]

 and:

 [-
pcsuri($_[0]), $rdrloc=$GWCe::pcsuri;
$http_headers_out{'Location'} = $rdrloc;
exit;
 -]


 I was having an intermittant problem with my redirects until I started
 using the new http_headers_out directive.
 The redirect was not being sent to the browser.  It could be I had
 another error somewhere, but just wanted to report it to the list in
 case someone else notices an issue using Apache redirect inside of
 Embperl.


Both version should do the same thing! (Version one will return status 302,
while version two uses 301, but the result is the same) I am using the first
version in a lot of places, whithout problems...

I just copied your two pieces of code in two files, to make sure nothing is
broken, and both work without problems :-)

Gerald



Apache::Session hangs script

1999-01-02 Thread tarkhil

 "Kip" == Kip Cranford writes:

Kip I'm using Apache/1.3.9 (Unix), mod_perl/1.21, Apache-Session-1.03, with
Kip MySQL 3.22.25.  I'm using the the Apache::Session::DBI module with MySQL
Kip to provide some simple session management.  I'm running the script as a
Kip PerlHandler...

Kip 
Apache::Session::SysVSemaphoreLocker::acquire_read_lock(/usr/lib/perl5/site_perl/5.005/Apache/Session/SysVSemaphoreLocker.pm:50):
Kip 50: $self-{sem}-op($self-{read_sem} + $self-{nsems}/2, 0,
Yes, I know, I've posted it here before. For some people (are you
using FreeBSD?) Apache::Session blocks forever after first usage. I've 
reported it to the list, but no one helped.

I've ended up using dummy locking :-(
 

-- 
Alexander B. Povolotsky[ICQ 18277558]
[2:5020/145][[EMAIL PROTECTED]]



RE: DBI and pooling

1999-01-02 Thread Gerald Richter

 
  Apache::DBI caches the database handle, while connect_cached cache the
  statement handle, so you could/should use both together.
 
 You're thinking of prepare_cached.
 
Oops, you are right! Wrote this mail too early in the morning...

Gerald