Apache::Constants in startup.pl

2002-10-06 Thread allan

hi

this might be a faq, but couldn't find it in the manual.
is it not possible to preload the Apache constants ?


currently i do like this in my handler file:

Foo.pm
--
package Apache::Foo;

use strict;
use Apache::Reload;
use Apache::Constants ':common';
...
sub handler {
 my $r = shift;
 ...
 return OK if $r-header_only;
 ...
}



that works ok, but i would like to move the line

  use Apache::Constants ':common';

to my startup.pl file.

but if i do that switch, i will get this kind of error:

[error] Bareword OK not allowed while strict subs in use


why is that ?

./allan



Re: Apache::Constants in startup.pl

2002-10-06 Thread Per Einar Ellefsen

At 17:42 06.10.2002, allan wrote:
   use Apache::Constants ':common';

to my startup.pl file.

but if i do that switch, i will get this kind of error:

[error] Bareword OK not allowed while strict subs in use


why is that ?

Hi Allan,

This is because when you issue use Apache::Constants ':common'; the 
constants are loaded into the namespace calling this use statement.
However, when you get to your handler, you're in a different namespace from 
your startup.pl file; consequently, the bareword 'OK' isn't defined.

In mod_perl 2, the constants are loaded into the Apache:: namespace 
instead, so your trick would work.

But does it really cost you that much to have that small line at the top of 
your handler code? There are worse things :)


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





mod_perl, Apache2

2002-10-06 Thread Benny Jensen



Hi,

I wonder if anyone can tell me what to do to solve 
this problem? I'm no perl programmer. Just want to GET ASP to work on my Apache2 
webserver.

cc -c 
-I/usr/src/mod_perl-1.99_07/src/modules/perl -I/usr/src/mod_perl-1.99_07/xs 
-I/usr/local/apache/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN 
-fno-strict-aliasing -I/usr/local/include -DMOD_PERL -O3 
-DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC 
"-I/usr/lib/perl/5.8.0/CORE" APR.cRunning Mkbootstrap for APR 
()chmod 644 APR.bsrm -f 
../../../blib/arch/Apache2/auto/APR/APR.soLD_RUN_PATH="" cc -shared -L/usr/local/lib APR.o -o 
../../../blib/arch/Apache2/auto/APR/APR.so -L/usr/local/apache/lib 
-lapr -laprutil/usr/bin/ld: cannot find -laprcollect2: ld 
returned 1 exit status

//Benny


Re: Apache::SharedMem

2002-10-06 Thread Perrin Harkins

[EMAIL PROTECTED] wrote:
 We are using IPC::MM and it works great.

IPC::MM is the fastest game in town.  It's only drawback is that the 
data is not persistent, so if you want your cache to persist across 
restarts it won't work for you.

Apache::SharedMem and all the other modules based IPC::ShareLite or 
IPC::Shareable are slow.  If IPC::MM won't work for you, I'd suggest 
MLDBM::Sync, Cache::FileCache, or Cache::Mmap.

- Perrin




non-internal redirect at authenticate stage in Apache 2?

2002-10-06 Thread Kirk Bowe


Hi.  In Apache 1 I used the CGI module to send out HTML to do a
non-internal redirect from my PerlAuthenHandler script, once
authentication had been established.  But now Apache 2 / mod_perl 2
doesn't seem to like that (complains that it can't do a send_cgi_header on
a null value, for exactly the same code).

If anyone could suggest a method for redirecting the browser to a
specified non-internal url, in Apache 2 / mod_perl 2, from a
PerlAuthenHandler, I'd be really grateful.


Cheers


Kirk.




Re: problems with sessions and upgrading

2002-10-06 Thread Gerald Richter


 1)  the sessions keys for the new sessions are twice as long as the
 old ones.  generally, this is a good thing, but i am concerned that
 the old session data will not get read when the cookie is submitted.
 will the old sessions get read and reused, read and new ones created,
 totally ignored?


As far as I know the Apache::Session code this should work, because
Apache::Session only validates that the key contains of numbers and letters,
but doesn't checks the length.

Anyway you should carefully verify that this is really true, to be sure not
to loose your data

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





RE: error from my .htaccess file

2002-10-06 Thread Ged Haywood

Hello again,

Please CC the List with your replies.

On Sun, 6 Oct 2002, Mitchel, Jennifer (Jem) wrote:

 
  Yes I am sure.
 
 -Original Message-
 From: Ged Haywood [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, October 05, 2002 3:12 AM
 To: Mitchel, Jennifer (Jem)
 
 Are you sure you're running the new Apache?

I saw this problem once (a couple of years ago I think) and the guy
said it turned out to be a permissions problem - although I don't know
exactly what.  Have you checked that all the files and directories
have the appropriate permissions?

73,
Ged.




Re: Apache::Constants in startup.pl

2002-10-06 Thread allan

hi per

thanks very much for the reply.

hmm, ok then. i see. so another theoretic workaround [though ugly]
could be to use the fully qualified name of the constant, like 

  return Apache::Constants-OK if $r-header_only;

./allan


Per Einar Ellefsen wrote:
 
 At 17:42 06.10.2002, allan wrote:
use Apache::Constants ':common';
 
 to my startup.pl file.
 
 but if i do that switch, i will get this kind of error:
 
 [error] Bareword OK not allowed while strict subs in use
 
 
 why is that ?
 
 Hi Allan,
 
 This is because when you issue use Apache::Constants ':common'; the
 constants are loaded into the namespace calling this use statement.
 However, when you get to your handler, you're in a different namespace from
 your startup.pl file; consequently, the bareword 'OK' isn't defined.
 
 In mod_perl 2, the constants are loaded into the Apache:: namespace
 instead, so your trick would work.
 
 But does it really cost you that much to have that small line at the top of
 your handler code? There are worse things :)
 
 --
 Per Einar Ellefsen
 [EMAIL PROTECTED]



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

2002-10-06 Thread Randy Kobes

On Thu, 3 Oct 2002, Paul Simon wrote:

 If I try to call index.cgi under /test/index.cgi, the page just
 hangs. index.cgi works as a straight CGI page. Here it is:
 #!C:/Perl/bin/Perl.exe
 
 print Content-type: text/plain\n\n;
 print mod_perl 2.0 rocks!\n;
[ .. ]

I just upgraded all the Win32 binaries on our site for both
mod_perl-2 and mod_perl-1, including the ppm files and the
all-in-one packages, to use the latest Apache sources (2.0.43 and
1.3.27), in light of the security concerns in older versions.  
All the mod_perl tests for the various packages passed on my
system, and in particular simple registry scripts work OK with
perl-5.6.1 and this mod_perl-2 - you may want to give this a try.
Note that the mod_perl version hasn't changed with these
upgrades, so if you install via ppm, you may have to uninstall
the current package first, or else force the install.

-- 
best regards,
randy




Re: Apache::Constants in startup.pl

2002-10-06 Thread Per Einar Ellefsen

At 21:29 06.10.2002, allan wrote:
hi per

thanks very much for the reply.

hmm, ok then. i see. so another theoretic workaround [though ugly]
could be to use the fully qualified name of the constant, like

   return Apache::Constants-OK if $r-header_only;

Yes, but it would be Apache::Constants::OK instead.


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]