Date: 01/15/01
- Next message: Sean R. Bright: "RE: [PHP-DEV] PHP 4.0 Bug #8728 Updated: Patch: usleep() working on win32 platforms"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] Legal solution: RE: [PHP-DEV] Non-GPL readline"
- In reply to: Zak Greant: "Re: [PHP-DEV] Scope of set_time_limit"
- Next in thread: Zak Greant: "Re: [PHP-DEV] Scope of set_time_limit"
- Reply: Zak Greant: "Re: [PHP-DEV] Scope of set_time_limit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Right - as I said, the executed program will go on running, whereas the
script will terminate...
At 01:44 16/1/2001, Zak Greant wrote:
>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: php-dev-unsubscribe <email protected>
> > >For additional commands, e-mail: php-dev-help <email protected>
> > >To contact the list administrators, e-mail: php-list-admin <email protected>
> >
> > --
> > Zeev Suraski <zeev <email protected>>
> > CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
> > For additional commands, e-mail: php-dev-help <email protected>
> > To contact the list administrators, e-mail: php-list-admin <email protected>
> >
-- Zeev Suraski <zeev <email protected>> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sean R. Bright: "RE: [PHP-DEV] PHP 4.0 Bug #8728 Updated: Patch: usleep() working on win32 platforms"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] Legal solution: RE: [PHP-DEV] Non-GPL readline"
- In reply to: Zak Greant: "Re: [PHP-DEV] Scope of set_time_limit"
- Next in thread: Zak Greant: "Re: [PHP-DEV] Scope of set_time_limit"
- Reply: Zak Greant: "Re: [PHP-DEV] Scope of set_time_limit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

