Zeev Suraski wrote:
> BTW, offhand, I'm not sure that it's really not working.  The time limit
> should still be imposed (at least under UNIX, not under Windows).
However,
> the executed program will go on running.

    I did a very basic test:

    <?php
        set_time_limit (1);

        print exec ('for file in `ls -R /`; do echo $file; done');

        for ($x=0; $x < 1000000; ++$x) ;
        echo "Foo!";
    ?>

    The script runs, exiting with this message:
        /var/yp/binding
        Fatal error: Maximum execution time of 1 second exceeded in
/home/zak/public_html/stl.php on line 6

    It looks like the time limit does not apply to the executed program...

    --zak

>
> Zeev
>
> At 07:17 15/1/2001, Zak Greant wrote:
> >A recent note added to the manual errata pointed out the
> >set_time_limit does not affect system commands that have
> >been executed by PHP.
> >
> >I would guess that attempting to limit system behavior in
> >this way is beyond the scope of set_time_limit.
> >
> >Any opinions or options on this issue?  My feeling is that
> >we document that set_time_limit is not a safe way to limit
> >the resource usage of commands run via calls to exec, etc...
> >
> >--zak
> >
> >
> >
> >--
> >PHP Development Mailing List <http://www.php.net/>
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> Zeev Suraski <[EMAIL PROTECTED]>
> CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to