perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Grimm <edgr...@asgard.rsc.raytheon.com>
Subject RE: [ -Execute ( ' * ' ) -] Doesn't Work!
Date Tue, 01 Oct 2002 00:39:45 GMT
Ugh.  You're right; I found it in the HTML::EmbperlObject manpage.
(This is from Embperl 1.3.3; we've been having difficulty in getting
time to upgrade...)

    This frame page can now include other pages, using the
    HTML::Embperl::Execute method.  Because the search path is set by
    EmbperlObject the included files are searched in the directories
    starting at the directory of the original request walking up thru
    the directory which contains the base page.

It shouldn't be needed, but you may find a slightly later paragraph
useful...

    To include the original requested file, you need to call Execute
    with a '*' as filename.  To call the the same file, but in an upper
    directory you can use the special shortcut ../*.

HTH,
Ed

On Mon, 30 Sep 2002, Powers, Dean wrote:

> Thanks for the info Ed, but I don't agree that Embperl is searching only
> EMBPERL_OBJECT_BASE and
> EMBPERL_OBJECT_FALLBACK. On the URL reference you gave (page 3) it also
> states:
>
> "EMBPERL_OBJECT_ADDPATH top
>
> Additional directories where to search for pages. Directories are separated
> by ; (on Unix : works also). This path is always appended to the
> searchpath."
>
> The reason that I have different domains for different directories is
> because I store domain specific components such as logo.gif,
> domain_description.html, etc. in each domain directory. Everything else is
> stored in /htdocs.
>
> Doing a bunch of symbolic links from the domain directories to the
> boilerplate directory kinds of defeats the whole purpose of using Embperl in
> the first place, namely to be able to manage many web sites using base.epl
> and component files.
>
> So, my question (which hopefully Gerald will see) is WHY Embperl works
> perfectly for serving base.epl, notfound.html, and explicitly requested
> files [- Execute ('filename.html') -] out of /htdocs for the domain
> /htdocs/mybookprices, but can't seem to serve up boilerplate.html when
> requested by [- Execute ('*') - ].
>
> After all, they are ALL coming out of /htdocs and Apache/Embperl serves then
> quite well, EXCEPT for [- Execute ('*') - ].
>
> Dean
>
> -----Original Message-----
> From: Ed Grimm [mailto:edgrimm@asgard.rsc.raytheon.com]
> Sent: Monday, September 30, 2002 5:03 PM
> To: Powers, Dean
> Cc: embperl@perl.apache.org
> Subject: RE: [ -Execute ( ' * ' ) -] Doesn't Work!
>
>
> Embperl only searches for EMBPERL_OBJECT_BASE and
> EMBPERL_OBJECT_FALLBACK, so far as I can tell from the docs.  At least,
> the docs explicitly mention it searches for them, and it doesn't
> indicate that it does for the other pages.  Note that
> EMBPERL_OBJECT_STOPDIR talks like the base page is the only page for
> which Embperl searches, and EMBPERL_OBJECT_FALLBACK talks like it is the
> only other page for which Embperl searches.
>
> I believe the thinking is that the content pages would probably be
> different, or you won't need a different directory for your different
> domain.  To get around this, I've used symbolic links pointing to the
> real file (which then does not have to be in an ancestral path at
> all...)  Admittedly, I'm not in the hundreds (or even dozens) of domains
> category; I don't know how well this would scale.  I can see that it
> would certainly be very annoying if you had a few pages that are
> identical on hundreds of sites, and a few pages that are different on
> those same sites, but I don't know how often that would happen.
>
> References:
> http://perl.apache.org/embperl/pod/doc/EmbperlObject.-page-3-.htm
>
> Ed
>
> On Mon, 30 Sep 2002, Powers, Dean wrote:
>
> > Yes, you are write, the server is try to load
> > /usr/local/apache/htdocs/mybookprices/content.html. And Embperl tells
> > us that when a requested file is not in the directory, it "walks" up
> > the directory tree set by EMBPERL_OBJECT_BASE  until it finds the
> > file.
> >
> > That's how base.epl, notfound.html and [- Execute ('content.html') -]
> > are all being served by Apache. They're not in the subdirectory, but
> > being served out of /htdocs because that's how Embperl works. It
> > doesn't find them in /bookprices, so it walks the tree.
> >
> > So, I'm back to the original question, if Apache/Embperl will server
> > out base.epl, notfound.html, and explicitly requested files [- Execute
> > ('filename.html') - ] form /htdocs directory, why won't it serve out [
> > Execute ('*')  -] from the /htdocs directory?
> >
> > Thanks for everyone's help, I think we're getting closer to an answer,
> > which is important to all of us who want to support dozens or even
> > hundreds of virtual hosts with a SINGLE base.epl and boilerplate files
> > out of /htdocs.
> >
> > Dean
> >
> > -----Original Message-----
> > From: Ed Grimm [mailto:edgrimm@asgard.rsc.raytheon.com]
> > Sent: Monday, September 30, 2002 4:09 PM
> > To: Powers, Dean
> > Cc: embperl@perl.apache.org
> > Subject: Re: [ -Execute ( ' * ' ) -] Doesn't Work!
> >
> >
> > On Mon, 30 Sep 2002, Andre Landwehr wrote:
> >> On Mon, Sep 30, 2002 at 12:56:24PM -0700, Powers, Dean wrote:
> >>> I think the problem is related to the "path" that Embperl sets when
> >>> it "walks" up the directory path to base.epl (...) It seems that the
> >>> problem is that "base.epl" is in the directory ABOVE the
> >>> DocumentRoot. I've tried [- Execute (../*)  to get the file from the
> >>> next directory UP but that doesn't work either. :)
> >>
> >> I think what you run into is not a problem of Embperl here but one of
> >> Apache: You try to request a file that is not inside the DocumentRoot
> >> and Apache prevents you from doing that (imagine it wouldn't, would
> >> be nice to request sth. like ../../../etc/passwd from big companies
> >> servers then *grin*)
> >
> > It's not so much that it's outside DocumentRoot, but that it's not in
> > any space Apache is told to view.  So therefore, it isn't the
> > requested document, because when Apache mapped the filename, it didn't
> > map it to that directory.
> >
> > Basically, the server's trying to load
> >
> >     /usr/local/apache/htdocs/mybookprices/content.html
> >
> > and that file doesn't exist.
> >
> > Whether he changes DocRoot or he changes where content.html is does
> > not matter for this; what matters is he does one of them.  However, it
> > may matter for other aspects of what he's doing.
> >
> > I think the suggestion of changing DocRoot and doing a redirect is not
> > clean, but I can imagine some implementations where that is preferable
> > to the cleaner solution.
> >
> > Incidentally, it's not a problem of Apache.  Apache is doing what it's
> > supposed to do.  It's a confusion regarding how Apache is supposed to
> > work.
> >
> > Ed
>


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message