# "Tunnelling" require/include through userspace streams filter

- Thread: https://externals.io/message/22242
- Original archive: https://news-web.php.net/php.internals/22242
- Started by Sebastian Bergmann on 2006-03-08T07:44:00+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #22242 — Sebastian Bergmann — 2006-03-08T07:44:00+00:00

URL: https://externals.io/message/22242#22242

Is there a way to tunnel require/include through a userspace streams
 filter?

 What I want to do is write a userspace streams filter and register that
 as some kind of default filter through which require/include read their
 files.

 Thanks,
Sebastian

-- 
Sebastian Bergmann                      http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

---

## #22249 — Sara Golemon — 2006-03-08T16:05:57+00:00

URL: https://externals.io/message/22242#22249 · In reply to: #22242

include('php://filter/string.toupper/resource=/foo/bar/baz');

Filters can be stacked, set on the read or write chains individually (though 
the latter hardly matters for include/require), and resource can be another 
wrapper, not just a local file.

Ref: http://www.php.net/wrappers.php

-Sara

----- Original Message ----- 
From: "Sebastian Bergmann" <sb@sebastian-bergmann.de>
Newsgroups: php.internals
To: <internals@lists.php.net>
Sent: Tuesday, March 07, 2006 11:44 PM
Subject: "Tunnelling" require/include through userspace streams filter


> Is there a way to tunnel require/include through a userspace streams
> filter?
>
> What I want to do is write a userspace streams filter and register that
> as some kind of default filter through which require/include read their
> files.
>
> Thanks,
> Sebastian
>
> -- 
> Sebastian Bergmann                      http://www.sebastian-bergmann.de/
> GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

---

## #22250 — Sebastian Bergmann — 2006-03-08T16:13:18+00:00

URL: https://externals.io/message/22242#22250 · In reply to: #22249

Sara Golemon schrieb:
> include('php://filter/string.toupper/resource=/foo/bar/baz');

 I do not want to change the include/require calls but instead set up
 a filter for the standard ones.

-- 
Sebastian Bergmann                      http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

---

## #22251 — Sara Golemon — 2006-03-08T18:01:37+00:00

URL: https://externals.io/message/22242#22251 · In reply to: #22250

Oops, missent this the first time using my personal address... Sebastian:
Please don't reply-all to that one, I'm trying to keep that off the list.

> I do not want to change the include/require calls but instead set up
> a filter for the standard ones.
>
Ah... I can see use for that.

I'm actually about to do some (overdue) fixes/stabilizations to
php6-unicode-streams.  Once that's all settled, I'll come back to this and
look at adding something along the lines of:  stream_filter_auto() or
whatever.

-Sara

---

## #22252 — Sebastian Bergmann — 2006-03-08T18:34:35+00:00

URL: https://externals.io/message/22242#22252 · In reply to: #22251

Sara Golemon schrieb:
> Ah... I can see use for that.

 I expected nothing else from you ;-)

> I'll come back to this and look at adding something along the lines 
> of: stream_filter_auto() or whatever.

 Great, and thanks in advance,
Sebastian

-- 
Sebastian Bergmann                      http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69
