You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Pierre Phaneuf <pp...@ludusdesign.com> on 2001/02/12 15:35:16 UTC

trouble with path_info

I spent two days trying to make my "virtual document" PerlHandler work
from various locations, which I had thought to be really easy, by simply
looking at the path_info to determine what virtual document to bring up.

No go.

In just about every cases that I could do, I have $r->path_info
identical to $r->uri!

I freaked out after a while, thinking I must have been doing something
wrong here, so I downloaded the Apache::TreeBrowser module from the
modperl.com site, installed it as the sole handler in my server (no
translation handler or *anything* else). I installed it just like in the
Eagle book.

Where on http://www.modperl.com/tree/ I see this:

URI = /tree/
Path information =/

On my server (http://foobar/virtual) I see this:

URL = /virtual
Path information =/virtual

What the heck??? I was expecting path_info to be blank there, then
getting a redirect to /virtual/ (and having just a slash in there).

I think that I know what I might be doing wrong though: I'm running
Apache 1.3.14 and mod_perl 1.24_01 from the Red Hat "RawHide", on a Red
Hat Linux 7.0. 1.24_01 is a development version, right? :-)

In any case, this might be a problem developers might want to hear
about...

-- 
Pierre Phaneuf
http://www3.sympatico.ca/pphaneuf/

Re: trouble with path_info

Posted by Pierre Phaneuf <pp...@ludusdesign.com>.
Pierre Phaneuf wrote:

> > Then what you are seeing is correct. What does the relevent
> > httpd.conf snippet look like?
> 
> Just like in the eagle book (page 143):
> 
> <Location /virtual>
> SetHandler perl-script
> PerlHandler Apache::TreeBrowser
> </Location>
> 
> And I'm totally unable to get what you see on page 137. :-(
> 
> I will try with a non-development mod_perl now. :-)

I just tried going back to the RPMs that came with Red Hat 7.0, no go
either (Apache 1.3.12, mod_perl 1.24).

-- 
"MSDOS didn't get as bad as it is overnight -- it took over ten
years of careful development." -- dmeggins@aix1.uottawa.ca

Re: trouble with path_info

Posted by Pierre Phaneuf <pp...@ludusdesign.com>.
darren chamberlain wrote:

> > In just about every cases that I could do, I have $r->path_info
> > identical to $r->uri!
> 
> If you are installing your handler as such:
> 
> <Location />
>     SetHandler  perl-script
>     PerlHandler My::Package
> </Location>
> 
> Then what you are seeing is correct. What does the relevent
> httpd.conf snippet look like?

Just like in the eagle book (page 143):

<Location /virtual>
SetHandler perl-script
PerlHandler Apache::TreeBrowser
</Location>

And I'm totally unable to get what you see on page 137. :-(

I will try with a non-development mod_perl now. :-)

-- 
"Unix gives you just enough rope to hang yourself -- and then a couple
of more feet, just to be sure." -- Eric Allman

Re: trouble with path_info

Posted by darren chamberlain <dl...@users.sourceforge.net>.
Pierre Phaneuf (pp@ludusdesign.com) said something to this effect on 02/12/2001:
> I spent two days trying to make my "virtual document" PerlHandler work
> from various locations, which I had thought to be really easy, by simply
> looking at the path_info to determine what virtual document to bring up.
> 
> No go.
> 
> In just about every cases that I could do, I have $r->path_info
> identical to $r->uri!

If you are installing your handler as such:

<Location />
    SetHandler  perl-script
    PerlHandler My::Package
</Location>

Then what you are seeing is correct. What does the relevent
httpd.conf snippet look like?

(darren)

-- 
Most rock journalism is people who can't write interviewing people who
can't talk for people who can't read.
    -- Frank Zappa