RE: PerlTransHandler headaches

2003-07-30 Thread Glenn E. Bailey III
: 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 Devel

Re: PerlTransHandler headaches

2003-07-30 Thread Geoffrey Young
: so, the general rule for PerlTransHandlers is to return : DECLINED unless you : set $r->filename. What I am trying to do is just test, to make sure it is working ok. So what I did is wrote the following snippit: sub handler { my $r = shift; return DECLINED; } That should still a

RE: PerlTransHandler headaches

2003-07-30 Thread Glenn E. Bailey III
: 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 t

Re: PerlTransHandler headaches

2003-07-30 Thread Geoffrey Young
Glenn E. Bailey III wrote: Hello, While I am not new to Perl, I am completely new to mod_perl. check out the resources at http://perl.apache.org/ - there's lots of good information there :) sub handler { my $r = shift; return OK; } 1; And not matter what I always get a 404 with

Re: PerlTransHandler problem

2002-06-13 Thread darren chamberlain
* 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

Re: PerlTransHandler problem

2002-06-12 Thread Nick Tonkin
mod_rewrite is going to be faster for this and easier to implement, I'd say. RewriteEngine on RewriteCond %{HTTP_HOST} !^myserver\.rhythm\.com [NC] RewriteRule ^/(.*) http://myserver.rhythm.com/$1 [L,R] in your httpd.conf will probably do the trick. Of course this does't solve your conundrum v

Re: PerlTransHandler problem

2002-06-12 Thread simran
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 {

Re: PerlTransHandler problem

2002-06-12 Thread Lyle Brooks
Quoting Lyle Brooks ([EMAIL PROTECTED]): > Sounds like it's more of a DNS issue than a modperl issue. > > Depending on what your motivation for requiring the full name, you > may also explicitly set > > ServerName myserver.rhythm.com > UseCanonicalName off errr... should be UseCanonicalName O

Re: PerlTransHandler problem

2002-06-12 Thread Lyle Brooks
Sounds like it's more of a DNS issue than a modperl issue. Depending on what your motivation for requiring the full name, you may also explicitly set ServerName myserver.rhythm.com UseCanonicalName off Quoting Rasoul Hajikhani ([EMAIL PROTECTED]): > I am realy tryi

Re: PerlTransHandler problem

2002-06-12 Thread Lyle Brooks
You are only going to have Transhandlers defined in the main server or virtual host, not in any or containers. Check and see if you have any other Transhandlers defined earlier in your httpd.conf file. If an earlier Transhandler returns OK, then later ones won't be called. Quoting Rasoul Haj

Re: PerlTransHandler problem

2002-06-12 Thread Rasoul Hajikhani
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]): > >

Re: PerlTransHandler problem

2002-06-12 Thread Rasoul Hajikhani
I am realy trying to make sure that all requests for http://myserver/ are treated as http://myserver.rhythm.com/ so that my other applications that depend on reading cookies down the request chain could actually do so... -r "Randal L. Schwartz" wrote: > > > "Rasoul" == Rasoul Hajikhani <[EM

Re: PerlTransHandler problem

2002-06-12 Thread Randal L. Schwartz
> "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

Re: PerlTransHandler problem

2002-06-12 Thread Lyle Brooks
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); > >

RE: PerlTransHandler and CGI.pm

2000-06-07 Thread Eric Jain
Got it... Seems like the query string is decoded twice: Therefore http://biodoc.ch/de/search;query=%252Btest+%252Bdna+-xyz works perfectly, since all the '%' are encoded. Then it even works with slashes :-) -- Eric Jain > When processing the url > http://biodoc.ch/de/search?query=%2Btest+%2B

Re: PerlTransHandler

2000-05-25 Thread Doug MacEachern
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;'. addin

Re: PerlTransHandler

2000-05-25 Thread Sergey Ivanyuk
> > 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 >

Re: PerlTransHandler

2000-05-25 Thread Doug MacEachern
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 alia

Re: PerlTransHandler question.

2000-05-23 Thread Randal L. Schwartz
> "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't

RE: PerlTransHandler question.

2000-05-23 Thread Geoffrey Young
time to pick up the Eagle book...   check out http://www.modperl.com/   specifically http://www.modperl.com/book/chapters/ch7.html#The_URI_Translation_Phase   HTH   --Geoff -Original Message-From: Antonio Pascual [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 23, 2000 9:59 AMTo: [

RE: PerlTransHandler and sort of mapping

2000-04-07 Thread Eric Cholet
> 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 : > > >PerlTransHandler Apache::MyHandler > > > > Yes I know this is wrong...can this be done in some other way ? Y

Re: PerlTransHandler

1999-10-21 Thread Randal L. Schwartz
> "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. -

Re: PerlTransHandler

1999-10-21 Thread Dan Rench
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 u

Re: PerlTransHandler

1999-10-20 Thread Mark Cogan
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 PerlTransHan

Re: PerlTransHandler

1999-10-19 Thread William Deegan
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

RE: PerlTransHandler

1999-10-19 Thread Eric Cholet
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 of dynamic mod_rewrite > fu