Re: [PHP3] Apache modules, PHP & stdin
| From: | Mikael Vidstedt | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: [PHP3] Apache modules, PHP & stdin | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-11124@lists.php.net to get a copy of this message | ||
On Mon, 20 Sep 1999, Rasmus Lerdorf wrote:
> Couldn't you just eval() the data returned by apache_note()?
>
> You seem to be under the impression that the module version of PHP parses
> data on stdin and if you could just get your data onto stdin your problems
> would be solved. This is not the case at all. Apache passes PHP a
> filename which PHP then opens and parses. There is absolutely no
> provision to parse data on stdin in the module version.
>
> To escape the eval() solution, you'd need to hack up mod_php3.c and do
> some magic there. Note that apache_php3_module_main() is expecting a file
> descriptor which it then does an fdopen() on and feeds that to the parser.
I have read a great deal of PHP code. I had (almost) concluded that it
demands a file, but I wanted to be sure I hadn't missed some nice solution
to the problem.
Yes, I could (probably) do eval() on the data. Yes, I could rewrite
mod_php3.c. I just thought it would be possible to use php3 in the same
way as when it is run on command line.
I'll have a look at the two methods you describe and see what I can make
out of it.
Thank you!
/Mikael