php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50516 CLI script crashes with PHP Fatal error: Maximum execution time of 200 seconds
Submitted: 2009-12-18 11:07 UTC Modified: 2009-12-19 11:33 UTC
From: net_php at mojocafe dot jp Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.12 OS: OS X, FreeBSD 7.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: net_php at mojocafe dot jp
New email:
PHP Version: OS:

 

 [2009-12-18 11:07 UTC] net_php at mojocafe dot jp
Description:
------------
I have a long running script that crashes with the following message:

PHP Fatal error:  Maximum execution time of 200 seconds exceeded in 
xxx on line xxx

I have tried this script using the installed PHP CLI on OS 10.6.2, a 
separate source installed PHP CLI installed on OS 10.6.2 of PHP 
5.2.12, and finally a totally separate FreeBSD server running FreeBSD 
7.2

Whichever I used I get the above timeout of 200 seconds after maybe 
10-20 minutes of the script running. I can't find 200 seconds anywhere 
in any of the settings.

Strangely too it seems always to give the same line unless I change 
the script in which case it gives another line with a different 
function. i.e. an unchanged script gives the error in the same place 
but a change script gives it at a different place.



Reproduce code:
---------------
FREEBSD/OS X # php -r 'phpinfo();' | egrep 'php\.ini|max_execution_time'
Configuration File (php.ini) Path => /usr/local/etc
Loaded Configuration File => /usr/local/etc/php.ini
max_execution_time => 0 => 0


FREEBSD/OS X # grep max_execution_time /usr/local/etc/php.ini
max_execution_time = 30     ; Maximum execution time of each script, in seconds

OSX #$ php -v
PHP 5.2.12 (cli) (built: Dec 18 2009 03:04:58) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

FREEBSD # PHP 5.2.11 with Suhosin-Patch 0.9.7 (cli) (built: Sep 30 2009 16:42:21) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Script starts with
<?php
set_time_limit(0);



Expected result:
----------------
Expect the script to run till completion.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-18 11:19 UTC] jani@php.net
We don't support any build with any 3rd party patches.
 [2009-12-18 11:22 UTC] net_php at mojocafe dot jp
Where is the 3rd party patch here?

"OSX #$ php -v
PHP 5.2.12 (cli) (built: Dec 18 2009 03:04:58) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies"

It happens on both the OS X source install and the FreeBSD install.
 [2009-12-19 11:13 UTC] net_php at mojocafe dot jp
I can confirm that I get the same error for 5.3.1

20:04:59 $ php --version
PHP 5.3.1 (cli) (built: Dec 19 2009 16:49:18) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

and it also happens with an empty php.ini file
 [2009-12-19 11:33 UTC] net_php at mojocafe dot jp
I have moved this to http://bugs.php.net/50531 as it's been marked as 
bogus despite being on two machines only one of which had 3rd party. And 
also it happens on a new version 5.3.1
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 10:01:29 2024 UTC