Bug #71744 [NEW]: max execution time doesn't take effect in php built-in server

From: Date: Tue, 08 Mar 2016 13:47:44 +0000
Subject: Bug #71744 [NEW]: max execution time doesn't take effect in php built-in server
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199669@lists.php.net to get a copy of this message
From:             memoword at 163 dot com
Operating system: Windows 7 sp1
PHP version:      5.6.19
Package:          Built-in web server
Bug Type:         Bug
Bug description:max execution time doesn't take effect in php built-in server

Description:
------------
The max_execution_time option in php.ini doesn't work in php built-in
web server
The environment is windows 7 sp1 x64 ultimate with
php-5.6.19-nts-Win32-VC11-x86
 
I use a new php.ini-development as my php.ini file and set
max_execution_time to zero. Then make the scripts below as index.php.
Run the server: php -S localhost:8000 index.php
Then visit localhost:8000
After 60s it doesn't work anymore, and shows 'Fatal error: Maximum
execution time of 60 seconds exceeded in D:\********\index.php on line
4'

Test script:
---------------
<?php
while(1) {
echo date('H:i:s').'<br />';
sleep(5);ob_flush();flush();}

Expected result:
----------------
As I set max-execution-time to zero, the script should run
forever.However it only works for 60s. When I set max-execution-time to
600, it still only works for 60s.
After 60s it doesn't work anymore, and shows 'Fatal error: Maximum
execution time of 60 seconds exceeded in D:\********\index.php on line
4'

Actual result:
--------------
It stops after 60s.

When I run the server with php -S localhost:8000
and visit localhost:8000
It doesn't stop anymore even my max-execution-time is only 5

-- 
Edit bug report at https://bugs.php.net/bug.php?id=71744&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71744&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71744&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71744&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71744&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71744&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71744&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71744&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71744&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71744&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71744&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71744&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71744&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71744&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71744&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71744&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71744&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71744&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71744&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71744&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71744&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#199669) next »