> On Mon, 2003-09-22 at 19:50, uvm wrote:
> > I'm beggining to develop the theory that things go awry when 
> > using exec from within a webserver-executed PHP script to call 
> > a shell script itself written in PHP. 
> 
> Why are you trying to call a php script with exec...since it is php why
> not just call it directly instead of creating a process outside of the
> php you are in and then creating a php cgi to do the processing. It is
> easier to call parse the file with the php process that you are
> currently in.

While what you're saying is true, the point of what I'm trying to do is let
a PHP script I'm writing call another arbitrary script to retrieve some
data that's beyond the scope of what it should be made to do. Abstraction,
essentially.

I could use include() to accomplish this; however, I don't want to limit
someone else who might be using this extension mechanism to writing only
PHP scripts if at all possible. Using include() also introduces namespace
collision problems, which again, I'd like anyone using this mechanism
(including myself) to not have to worry about.

In short, I think there's a payoff by designing this way, allowing someone
to call an arbitrary external script (PHP or no) to perform a certain
function. I might be wrong. :)

The other thing -- I'm just curious as to why this apparently breaks PHP.

Thanks,
   Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to