there can be a Location-specific transhandler. I'm
wondering why it is impossible?
For now I have implemented that particular case by
PerlTransHandler MyPackage::transhandler
Location ...
PerlHandler MyPackage::handler
/Location
package MyPackage;
sub transhandler {
...
return DECLINED
if(grep
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thursday 14 August 2003 13:48, Frank Maas wrote:
|Location ...
| PerlSetVar SkipTransHandler 1
|/Location
I don't want to make it configurable.
Torsten
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)
translation and that would also explain why the two
solutions work...
well, they can only be used during translation if the URI is unaltered. for
instance, given the example we've seen already
PerlTransHandler MyPackage::transhandler
Location ...
PerlHandler MyPackage::handler
/Location
checking
thereof) you want to serve.
that's just how Apache works.
For now I have implemented that particular case by
PerlTransHandler MyPackage::transhandler
Location ...
PerlHandler MyPackage::handler
/Location
package MyPackage;
sub transhandler {
...
return DECLINED
if(grep {$_ eq __PACKAGE__.'::handler
from being in (all)
containers) Location is the innocent victim here.
For now I have implemented that particular case by
Wouldn't this be simpler?
|PerlTransHandler MyPackage::transhandler
|Location ...
| PerlSetVar SkipTransHandler 1
|/Location
|
|package MyPackage;
|
|sub transhandler
, given the example we've seen already
PerlTransHandler MyPackage::transhandler
Location ...
PerlHandler MyPackage::handler
/Location
checking get_handlers() in transhandler() only works because the initial
merge (which is thrown away) ends up being the same merge as after
translation
On Thu, Aug 14, 2003 at 11:07:13AM -0400, Geoffrey Young wrote:
There is actually a Location/LocationMatch sequence performed just
before the name translation phase (where Aliases and DocumentRoots are
used to map URLs to filenames). The results of this sequence are completely
thrown
the completely thrown away
part. in essence, this means that the results of the Location config
merging are discarded prior to translation, after which Location merging
is done again.
regardless, officially apache translation (which includes the
PerlTransHandler) cannot be Location specific - directives
and want to unset the TransHandler inside the Location.
How to do that?
AFAIK: not. The TransHandler is the first to be called and cannot appear
inside a container (ref. ModPerl cookbook). The only thing I can think of,
and in fact implemented this, to make the TransHandler URI-aware and
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I have a
VirtualHost ...
PerlTransHandler Handler
Location ...
/Location
/VirtualHost
and want to unset the TransHandler inside the Location.
How to do that?
Thanks
Torsten
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux
Hello,
While I am not new to Perl, I am completely new to mod_perl. I have
a client I am working on moving a project that runs under mod_perl.
He does alot manipulation with the PerlTransHandler stuff. Well,
even on a default mod_perl install, with a default Apache install, I
can not get
). since you didn't set
$r-filename, apache is returning 404, since it can't serve the value of
$r-filename.
so, the general rule for PerlTransHandlers is to return DECLINED unless you
set $r-filename.
chapter 12 in the mod_perl Developer's Cookbook deals specifically with the
PerlTransHandler
: check out the resources at http://perl.apache.org/ - there's
: lots of good
: information there :)
Heh, only found one document there concerning the TransHandler
stuff ..
: so, the general rule for PerlTransHandlers is to return
: DECLINED unless you
: set $r-filename.
What I am trying
allow me to pull up my default content, correct? As
of now it still gives me a 404 ..
make sure the request works without the PerlTransHandler installed first.
if it does, then adding that routine should be ok.
don't forget, you can't just change handlers and expect them to work -
because the code
: don't forget, you can't just change handlers and expect them
: to work -
This is probably what has been messing me up. Doing a quick stop
and restart of Apache after any change I made seems to have fixed
my problems, do! Thanks for your help ;-)
. Glenn E. Bailey III
. Network Solutions
Hi all,
Excuse me for my poor English because I'm from Russia.
I have the problem with url translation.
There are 2 scripts to do it.
1st script work perfectly, but 2nd failed.
Only difference between them is string my $dbh = DBI-connect...;
I use Apche::DBI but without this module the same
Hi!
On Fri, Jun 27, 2003 at 02:47:45PM +0400, Sergey V. Stashinskas wrote:
sub handler {
my $r = shift;
my $dbh = DBI-connect('dbi:mysql:db', 'user', 'pswd');
$dbh-disconnect;
maybe the DBI-connect isn't working and thus your script dies / throws some
error ?
I'd try to
14:56:22 +0200
Subject: Re: Problem with PerlTransHandler
Hi!
On Fri, Jun 27, 2003 at 02:47:45PM +0400, Sergey V. Stashinskas wrote:
sub handler {
my $r = shift;
my $dbh = DBI-connect('dbi:mysql:db', 'user', 'pswd');
$dbh-disconnect;
maybe the DBI-connect isn't
: Friday, June 27, 2003 1:48 PM
To: [EMAIL PROTECTED]
Subject: Problem with PerlTransHandler
Hi all,
Excuse me for my poor English because I'm from Russia.
I have the problem with url translation.
There are 2 scripts to do it.
1st script work perfectly, but 2nd failed.
Only difference
If these lines are commented out then script is working ok.
-Original Message-
From: [EMAIL PROTECTED]
To: Sergey V. Stashinskas [EMAIL PROTECTED],[EMAIL PROTECTED]
Date: Fri, 27 Jun 2003 16:39:12 +0300
Subject: RE: Problem with PerlTransHandler
Have you tried to comment out the 2
Sergey V. Stashinskas said:
If these lines are commented out then script is working ok.
-Original Message-
From: [EMAIL PROTECTED]
To: Sergey V. Stashinskas
[EMAIL PROTECTED],[EMAIL PROTECTED] Date: Fri, 27 Jun
2003 16:39:12 +0300
Subject: RE: Problem with PerlTransHandler
})(.*)/;
$r-subprocess_env(SESSION = $1);
$r-uri($2);
return DECLINED;
}
1;
-Original Message-
From: Raf [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Fri, 27 Jun 2003 15:09:13 - (GMT)
Subject: Re: Re[2]: Problem with PerlTransHandler
Sergey V. Stashinskas said
Jun 2003 15:09:13 - (GMT)
Subject: Re: Re[2]: Problem with PerlTransHandler
Sergey V. Stashinskas said:
If these lines are commented out then script is working ok.
-Original Message-
From: [EMAIL PROTECTED]
To: Sergey V. Stashinskas
[EMAIL PROTECTED],[EMAIL PROTECTED
2003 15:35:16 - (GMT)
Subject: Re: Re[4]: Problem with PerlTransHandler
Sergey V. Stashinskas said:
Problem is not in connection with database.
When I try to connect then $2 regexp variable becomes undefined and
script can not redirect anywhere. ($r-uri($2)) But when script
just fyi, mod_rewrite should be capable of handling those tests. See the
file tests under
http://httpd.apache.org/docs-2.1/en/mod/mod_rewrite.html#rewritecond
HTH, Aaron
On Tue, 2003-06-17 at 08:56, Joel Bernstein wrote:
Alternatively, can anybody suggest a different way to offer this
/Redirector.pm
It is loaded in the site Apache config like:
##begin apache config excerpt##
[ inside a VirtualHost block, outside Location block ]
PerlModule Apache::Publicprofile::Redirector
SetHandler perl-script
PerlTransHandler Apache::Publicprofile::Redirector
PerlSendHeader Off
##end apache config
Alternatively, can anybody suggest a different way to offer this
functionality? I don't think mod_rewrite applies, since the tests are
too complicated, but would stand corrected if somebody knows
different...
I posted this to london.pm earlier and had no joy.
/joel, getting a bit desperate.
On Tue, 2003-06-17 at 13:56, Joel Bernstein wrote:
Alternatively, can anybody suggest a different way to offer this
functionality? I don't think mod_rewrite applies, since the tests are
too complicated, but would stand corrected if somebody knows
different...
Have you tried moving the
for http://foo.bar.com/david to redirect to
http://foo.bar.com/?page=publicprofile.phpname=david .
the secret to the PerlTransHandler is this: it is there to make the URI into a file.
so, if you deconstruct the URI to a point where you know which real file you want to serve
(at a filesystem level
Hello All,
I am having a peculiar problem it seems that only one request can be serviced at a
time while using mod_perl (perlTransHandler).
we are using
Apache 1.3.26
mod_perl
It seems as though when I use mod_perl apache can handle only one request at a time.
If the first request
On Wed, 22 Jan 2003, Db-Doc SP wrote:
Hello All,
I am having a peculiar problem it seems that only one request
can be serviced at a time while using mod_perl
(perlTransHandler).
we are using
Apache 1.3.26
mod_perl
It seems as though when I use mod_perl apache can handle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Mon, 20 Jan 2003 10:10:36 +1100, Stas Bekman wrote:
Not in mod_perl 1.0. Your best bet is probably to move the
mod_rewrite's
rules into your perl transhandler.
or maybe just have mod_rewrite take precedence over mod_perl, by
having LoadModule
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I am trying to get a PerlTransHandler called *after* some mod_rewrite
processing.
I thought if I configure the rewrite rules *before* the PerlTransHandler:
RewriteEngine On
RewriteRule ... [PT]
PerlTransHandler Apache::TestTrans
Torsten Foertsch wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I am trying to get a PerlTransHandler called *after* some mod_rewrite
processing.
I thought if I configure the rewrite rules *before* the PerlTransHandler:
RewriteEngine On
RewriteRule ... [PT]
PerlTransHandler
How I Can redirect to page http://foo.bar/ses1/index.html from PerlTransHandler
Module?
On Fri, 22 Nov 2002 19:09:25 +0200
[EMAIL PROTECTED] wrote:
How I Can redirect to page http://foo.bar/ses1/index.html from PerlTransHandler
Module?
Hi,
the description of your problem is very... short.
The chapter 5 of 'eagle' book explain how to put and strip session ID
on the left
* Rasoul Hajikhani [EMAIL PROTECTED] [2002-06-12 19:12]:
Hello folks,
I am trying to implement a simple PerlTransHandler to change:
http://myserver/
to
http://myserver.rhythm.com/
And here is my code:
[-- snip --]
Have you seen http://httpd.apache.org/docs/misc/rewriteguide.html
Hello folks,
I am trying to implement a simple PerlTransHandler to change:
http://myserver/
to
http://myserver.rhythm.com/
And here is my code:
package MIS::GENERAL::FixURL;
use Apache::Constants qw(DECLINED);
use strict;
sub handler
{
my $r = shift;
my $uri = $r-uri
Quoting Rasoul Hajikhani ([EMAIL PROTECTED]):
Hello folks,
I am trying to implement a simple PerlTransHandler to change:
http://myserver/
to
http://myserver.rhythm.com/
And here is my code:
package MIS::GENERAL::FixURL;
use Apache::Constants qw(DECLINED);
use strict
Rasoul == Rasoul Hajikhani [EMAIL PROTECTED] writes:
Rasoul I am trying to implement a simple PerlTransHandler to change:
Rasoul http://myserver/
Rasoul to
Rasoul http://myserver.rhythm.com/
Both of those are / as far as as $r-uri is concerned.
What are you *really* trying to do
PROTECTED] writes:
Rasoul I am trying to implement a simple PerlTransHandler to change:
Rasoul http://myserver/
Rasoul to
Rasoul http://myserver.rhythm.com/
Both of those are / as far as as $r-uri is concerned.
What are you *really* trying to do?
--
Randal L. Schwartz - Stonehenge
A funny thing is happening with my PerlTransHandler...
It is not being called at all... :(
I have added warn messages but they never appear in the error log.
I am at a loss and hoping that some one may have an answer...
-r
Lyle Brooks wrote:
Quoting Rasoul Hajikhani ([EMAIL PROTECTED
.
Quoting Rasoul Hajikhani ([EMAIL PROTECTED]):
A funny thing is happening with my PerlTransHandler...
It is not being called at all... :(
I have added warn messages but they never appear in the error log.
I am at a loss and hoping that some one may have an answer...
-r
Lyle Brooks wrote
] writes:
Rasoul I am trying to implement a simple PerlTransHandler to change:
Rasoul http://myserver/
Rasoul to
Rasoul http://myserver.rhythm.com/
Both of those are / as far as as $r-uri is concerned.
What are you *really* trying to do?
--
Randal L. Schwartz
do so...
-r
Randal L. Schwartz wrote:
Rasoul == Rasoul Hajikhani [EMAIL PROTECTED] writes:
Rasoul I am trying to implement a simple PerlTransHandler to change:
Rasoul http://myserver/
Rasoul to
Rasoul http://myserver.rhythm.com/
Both of those
What it sounds like you want is:
PerlTransHandler Whatever::CheckName
and in CheckName.pm
sub handler {
my $r = instance Apache::Request(shift);
if ($r-hostname !~ /rhythm\.com/) {
$r-header_out(Location = http://myserver.rhythm.com.$r-uri);
return REDIRECT;
}
else
1;
});
gives two different sets of results when used via a transhandler or via
PerlTransHandler Apache::Kudos::Test # yields near to nothing in subprocess_env
Location /mod_perl_tutorial
SetHandler perl-script
PerlHandler Apache::Tutorial::First
/Location
The above does give th
-Original Message-
From: Paul Evad
To: [EMAIL PROTECTED]
Sent: 3/21/01 1:36 PM
Subject: %ENV via PerlTransHandler
question: how does one access the environment variables when using
mod_perl as a transhandler?
what kind of stuff are you expecting HTTP_REFERER and company via
On 15 Nov 2000, David Hodgkinson wrote:
Geoffrey Young [EMAIL PROTECTED] writes:
Perhaps that would make for a good talk ;)
mod_rewrite recovery?
Ok seriously then, we're proposing replacing a lite apache and
mod_rewrite with a slightly heavier, but presumably highly shared
Geoffrey Young [EMAIL PROTECTED] writes:
Perhaps that would make for a good talk ;)
mod_rewrite recovery?
Ok seriously then, we're proposing replacing a lite apache and
mod_rewrite with a slightly heavier, but presumably highly shared
mod_perled apache at the front end.
Measurements anyone?
be something wrong in my PerlTransHandler, approximatly
here:
my $uri = $r-uri();
if ( my($u1,$u2) = $uri =~ / ^ ([^?]+?) ; ([^?]*) $ /x )
{
$r-uri($u1);
$r-args($u2);
}
But what?
--
Eric Jain
. Slashes too only work if they are not encoded.
There must be something wrong in my PerlTransHandler, approximatly
here:
my $uri = $r-uri();
if ( my($u1,$u2) = $uri =~ / ^ ([^?]+?) ; ([^?]*) $ /x )
{
$r-uri($u1);
$r-args($u2
Hi All.
I'm having problems with the PerlTransHandler handler. I would like
to only translate some requests, but keep Aliases working. However, I
just can't get that done. If I use a simple 'return DECLINED;', all
my cgi scripts and aliases directories return 'Not found'. I know the
handler
On Thu, 25 May 2000, Sergey Ivanyuk wrote:
Hi All.
I'm having problems with the PerlTransHandler handler. I would like
to only translate some requests, but keep Aliases working. However, I
just can't get that done. If I use a simple 'return DECLINED;', all
my cgi scripts and aliases
I'm having problems with the PerlTransHandler handler. I would like
to only translate some requests, but keep Aliases working. However, I
just can't get that done. If I use a simple 'return DECLINED;', all
my cgi scripts and aliases directories return 'Not found'. I know the
handler
On Thu, 25 May 2000, Sergey Ivanyuk wrote:
package handler;
use Apache;
sub handler {
return DECLINED;
}
where does DECLINED come from? watch what happens if you add 'print
handler()' and run it from the command line, and watch what happens when
you add 'use strict;'. adding 'use
I want handler a request only if the url is like http://localhost/idTrans=XXX
In other case do the default
behaviour.
How could I do this?
I suppose that I have to use PerlTransHandler, but
I don't know how.
Thanks in advance.
Antonio.
: [EMAIL PROTECTED]Subject: PerlTransHandler
question.
I want handler a request only if the url is like
http://localhost/idTrans=XXX
In other case do the default
behaviour.
How could I do this?
I suppose that I have to use PerlTransHandler,
but I don't know how.
Thanks in advance
"Antonio" == Antonio Pascual [EMAIL PROTECTED] writes:
Antonio I want handler a request only if the url is like http://localhost/idTrans=XXX
Antonio In other case do the default behaviour.
Antonio How could I do this?
Antonio I suppose that I have to use PerlTransHandler, but I don'
Hi,
How do I get ENV variables values in my PerlTransHandler. I want to
know
the HTTP_USER_AGENT in my PerlTransHandler.
Please suggest me.
Get Your Private, Free E-mail from MSN Hotmail
hi,
I was wondering how to map PerlTransHandler only for certain type of files.
( I'm doing URI rewriting not URI-filename translation ?!!)
Something like :
Location
Files ~ "xml$"
PerlTransHandler Apache::MyHandler
/Files
/Location
Yes I know this is wrong...can this be do
hi,
I was wondering how to map PerlTransHandler only for certain type of files.
( I'm doing URI rewriting not URI-filename translation ?!!)
Something like :
Location
Files ~ "xml$"
PerlTransHandler Apache::MyHandler
/Files
/Location
Yes I know this is w
min/config then
set my handler?
Or should I write a PerlTransHandler for the whole site looking for a match,
then setting the perlhandler from there? Something like
$r-url =~ m:^/(.+)/admin/config$/ || return DECLINED;
$r-handler("perl-handler");
$r-push_
n /*/admin/config then
set my handler?
Take a look at LocationMatch
Gerald
Or should I write a PerlTransHandler for the whole site looking for a
match,
then setting the perlhandler from there? Something like
$r-url =~ m:^/(.+)/admin/config$/ || return DECLINED;
$r-handler("perl
This maybe be repeated becuase I sent the first message via
Geo Crawlere and don't know how long they are going to take
to review the message. Sorry if it comes in twice.
I am writing a simple PerlTransHandler that is going to change
the request into another with query string.
The following
"Ajay" == Ajay Shah [EMAIL PROTECTED] writes:
Ajay /articles/10/index.html = /articles/index.html?id=10
Ajay This is what I tried.
Ajay sub handler {
Ajay my $r = shift;
Ajay my $uri = $r-uri;
Ajay my ($id) = ($uri =~ m|^/articles/(.*?)/|);
Ajay my $newuri =
he
"native" handler will be called only if last Perl handler returned DECLINED.
Andrei
On Tue, Dec 21, 1999 at 01:45:40PM -0800, Doug MacEachern wrote:
At least that's what I thought !
In fact now Apache lets me use more then one
PerlTransHandler, but it doesn't care
of what
At least that's what I thought !
In fact now Apache lets me use more then one
PerlTransHandler, but it doesn't care
of what is the return codes are!!!
Even I return OK, it still calls
next registered handlers. Really weird!
mod_perl does care. but, mod_perl stacked handlers
Thanks for the answers!
I was using RedHat rpm and it was giving the problem
as it was suggested. After I built mod_perl with apache
(mod_perl 1.21, apache 1.3.9, the problem was resolved.
At least that's what I thought !
In fact now Apache lets me use more then one
PerlTransHandler
I use Apache config file with
PerlTransHandler entry. Yes I set
DECLINED, but actually it doesn't matter
in this case, because the LAST
handler out of all installed PerlTransHandlers in the
file actually gets invoked by Apache in my test.
If it be the FIRST, I would suspect that I
messed up
Waa!!! So far nobody who answered even doubted that
it should be possible to have more then one
PerlTransHandler. The "Eagle" book also says
that it should be possible. People suggested that
either my mod_perl built with wrong flags or I messed
up return codes OK/DECLINED (whic
On Thu, 16 Dec 1999, you wrote:
Waa!!! So far nobody who answered even doubted that
it should be possible to have more then one
PerlTransHandler. The "Eagle" book also says
that it should be possible. People suggested that
either my mod_perl built with wrong flags or I messed
H
--Geoff
-Original Message-
From: Evgenii Bazarov [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 13, 1999 8:42 AM
To: [EMAIL PROTECTED]
Subject: again - more then one PerlTransHandler
Hi everybody,
Sorry for the poor wording of my question. Once again:
I am trying to install an
translation
handler. I tried two approaches to specifying handlers
in the Apache config file (both recommended in the
"Eagle" book.) First, have both handlers on the same line,
e.g. in httpd.conf
PerlTransHandler SimpleTranslation::handler FancyTranslation::handler
In this c
- Original Message -
From: "Andrei A. Voropaev" [EMAIL PROTECTED]
To: "Evgenii Bazarov" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, December 15, 1999 10:18 AM
Subject: Re: again - more then one PerlTransHandler
It works perfectly well for me. I have
On 12 Dec 1999, Evgenii Bazarov wrote:
Hi!
I tried to set more then one PerlTransHandler but
if I specify both on the same line, Apache says
"syntax error", otherwise it see only the last one.
make sure you have built the server with at least PERL_STACKED_HANDLERS=1
or EV
line,
e.g. in httpd.conf
PerlTransHandler SimpleTranslation::handler FancyTranslation::handler
In this case Apache spits out error:
Syntax error on line 29 of /etc/httpd/conf/perl.conf
PerlTransHandler takes one argument, the Perl Translation handler routine
name.
and exits.
Secondly I tr
Hi!
I tried to set more then one PerlTransHandler but
if I specify both on the same line, Apache says
"syntax error", otherwise it see only the last one.
Apache 1.3.6 on Linux with mod_perl 1.19
According to "Apache Modules" book it should be
possible... Any advice will b
We use a TransHandler to (among other things) manage name-based virtual
hosts (simply put, given the incoming Host: header plus URI, map to a file).
We (of course) sanitize the incoming URI and Host. It works fine.
I "save" the sanitized hostname like so:
$r-header_in('Host',$host);
Dan Rench wrote:
PS: I'd still like to hear from anyone who is running mod_perl on
Solaris 2.5.1 with Perl 5.005_03 -- I don't want to stick with 5.004 forever.
If only you could upgrade to solaris 2.6. I have it running:
SunOS 5.6
This is perl, version 5.005_03 built for sun4-solaris
On Fri, 29 Oct 1999, I wrote:
I can only think of a couple options: hack http_core.c to do what I want,
or write a custom LogHandler that uses the sanitized host.
We've decided on another option: if you're sending a Host: header that
needs "sanitation," then either 1) you're trying to run
On Tue, 19 Oct 1999, Mark Cogan wrote:
On Tuesday, October 19, 1999 4:13 AM, William Deegan
[SMTP:[EMAIL PROTECTED]] wrote:
How can I change the environment variables that get passed to a perl
script running under Apache::Registry from a PerlTransHandler?
I'm using
"Dan" == Dan Rench [EMAIL PROTECTED] writes:
Dan I'd suggest using $r-subprocess_env() instead.
I was going to suggest that too. %ENV controls the environment
of the currently running Perl process, but child processes come from
the "subprocess env", which only the call above sets.
--
At 10:03 AM 10/19/99 -0700, William Deegan wrote:
Eric Cholet wrote:
On Tuesday, October 19, 1999 4:13 AM, William Deegan
[SMTP:[EMAIL PROTECTED]] wrote:
How can I change the environment variables that get passed to a perl
script running under Apache::Registry from a PerlTransHandler
Eric Cholet wrote:
On Tuesday, October 19, 1999 4:13 AM, William Deegan [SMTP:[EMAIL PROTECTED]]
wrote:
How can I change the environment variables that get passed to a perl
script running under Apache::Registry from a PerlTransHandler?
I'm using the PerlTransHandler to do a sort
85 matches
Mail list logo