Re: mod_rewrite & open_basedir & pear
| From: | Alexei Tenitski | Date: | Thu, 30 May 2002 03:15:46 +0000 |
| Subject: | Re: mod_rewrite & open_basedir & pear | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1514@lists.php.net to get a copy of this message | ||
Hi Stig
"Stig S. Bakken" wrote:
>
> On Tue, 2002-05-28 at 14:31, Alexei Tenitski wrote:
> > Hi Stig
> >
> > > > > > mod_rewrite is used to _hide_ urls from users and to _extend_ url with
> > > > > > additional params.
> > > > Do you know ways to implement above by php only?
> >
> > > One technique is to have an empty document root and only a 404 handler
> > > (you need to have "Options -Indexes" and a 403 handler to catch accesses
> > > to "/").
> > >
> > > The 404 handler just examines the URL and either does a readfile() (plus
> > > content-type and last-modified headers) from your internal document
> > > root, or a virtual() call to route the call to somewhere else served by
> > > Apache.
> > >
> > > I've used this with great success to implement an interface to a CMS
> > > providing plain URLs (ala /news/2002052801.html) instead of query-style
> > > URLs (ala /news.php?id=2002052801).
> >
> > Virtual looks interesting...
> >
> > In the man it's written that
> > virtual() cannot be used to include a document which is itself a PHP
> > file.
> > but I suppose http headers allow include anything and php files as well.
> >
> > however, neither readfile nor virtual can pass post variables
> > to the included script - am i correct?
> >
> > Most of the project is based on post requests.
> >
> > Virtual:
> > "virtual -- Perform an Apache sub-request"
> >
> > Apache sub requests (when doing subrequest from .htaccess):
> > "This uses an internal
> > subrequest to determine the check, so use it with care because
> > it decreases your servers performance!"
> >
> > Do we have the same story with performance decreases when doing virtual?
>
> Hm, POST requests don't mix well with these techniques (you'd have to do
> a full new request through http), so then I guess mod_rewrite is your
> best bet after all.
What i had to do, not the best solution though,
is to cut out DB class from pear and put it
to the directory with my project.....
I found that DB calss depend on PEAR.php, PEAR/,
System.php,Console/,DB.php.DB/
Thanks for helping me anyway :)
Alexei
>
> - Stig