You are here: Re: file:// streams: writing a custom wrapper « PHP Programming Language « IT news, forums, messages
Re: file:// streams: writing a custom wrapper

Posted by Jerry Stuckle on 05/19/06 20:34

Julien Biezemans wrote:
> Jerry Stuckle wrote:
>
>>Actually, I think this is a job better suited for the Apache
>>configuration. Try alt.apache.configuration
>>
>>You may also be able to do some of it at the OS (assuming you're using a
>>version of Unix/Linux).
>>
>
>
> How can apache help me there? I don't see the point. Please note that I
> need full local filesystem access in some internal parts of the
> application. The "jailed" wrapper is meant to be used as the default
> file:// scheme handler but internal stuffs will need the unrestricted
> wrapper (accessed under a different scheme than the default one, for
> example).
>
> Someone pointed me to open_basedir ini instruction, but this also causes
> _any_ stream function to be restricted to the specified directory, which
> is not acceptable.
>
> For example, I have a class autoload function that needs to access a
> directory outside the jail.
>
> I know, that's tricky. But I'm convinced that PHP could improve its
> stream wrappers support by supplying built-in wrapper classes. At the
> moment, being able to register a custom file:// scheme handler is almost
> of no use at all as there is now way to actually read and write the
> files within the custom wrapper.
>
> Julien.

Julien,

The Apache configuration can help because Apache is handling the file:// schema
- and you can use it to restrict access, redirect from one directory to another,
etc. However, fopen() does not use Apache - it goes straight to the OS, so
Apache configuration restrictions will not affect it.

Again, try alt.apache.configuration.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация