Re: Apache 2.0 sapi module
| From: | Sascha Schumann | Date: | Thu, 26 Oct 2000 20:51:41 +0000 |
| Subject: | Re: Apache 2.0 sapi module | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-36100@lists.php.net to get a copy of this message | ||
On Wed, 25 Oct 2000, Rasmus Lerdorf wrote:
> Should be a php-dev msg, but the silly server is still down, so I will
> start this here for now.
>
> You may have noticed that I checked in an initial framework for getting
> PHP to work as a filter. The main sticky point right now is that when PHP
> is acting like a filter we get a trickle of buckets coming down the filter
> chain. What I have currently done is write a bit of code that collects
> all the buckets until we have the entire stream of text to be parsed in a
> char *. We now need an efficient way to push this stream of data into the
> Zend engine to be parsed. I looked at the eval() code, but I am a bit
> uncertain about the efficiency of that approach.
>
> A different approach might be to modify the yyinput stuff to read the
> buckets directly one by one.
Alternatively, generalize it to a point where you can pass a
function reference to the engine:
size_t fill_input_buffer(char **);
This interface would allow us to keep the real logic
(handling buckets) where it belongs--in the Apache 2 SAPI
module, while granting SAPI modules enough flexibility to not
force them to write out scripts to files first.
I'm not much of a Bison expert to think about the
possibility/feasibility of such an implementation, so I'd
appreciate your comments.
- Sascha