php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24041 max_execution_time does not seem to work
Submitted: 2003-06-05 10:25 UTC Modified: 2003-06-26 18:09 UTC
From: jcastro at elnuevodia dot com Assigned: hholzgra (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.2 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jcastro at elnuevodia dot com
New email:
PHP Version: OS:

 

 [2003-06-05 10:25 UTC] jcastro at elnuevodia dot com
I have a page that people use to upload files. I changed from 4.2.3 to 4.3.2

my configuration is

max_execution_time = 3600
max_input_time = 60
memory_limit = 22M

web server: iis


The upload process will work for about 5 minutes and then stop. I will get and error message in my syslog saying that the script terminated because it ran for more than
3600.  That is imposible since it ran for only 4 or 5 minutes.  I had to go back to 4.2.3.  I even set the max_execution_time to 0 and I still get the same error, except the message change from 3600 to 0.  Keep in mind that I did not change any IIS configuration. just the php version toi make it work again.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-11 19:49 UTC] sniper@php.net
Quick analysis: The max_input_timeout is set in main.c for the request startup and should override the timeout for execution time..but it seems like the max_execution_time is not reset again after request startup is over. 
(hope someone else sees this and can check it out too :)

 [2003-06-15 18:08 UTC] sniper@php.net
Ilia: You messed with this the last time. And it really doesn't work with Apache either..(tried setting the execution time to 2 and max_input_time to 1, latter has no kind of effect)


 [2003-06-15 22:06 UTC] sniper@php.net
Hartmut: Your "fix" for something related to some weird keep-alive thing broke this. See SAPI.c:389-398

I tested with Apache and it left apache hang around forever
after first request that failed when max_input_time kicked in. 

Settings:

max_execution_time = 2
max_input_time = 1

And upload big enough file. Might hang also in the first try, just check what the apache childs are doing after the request hangs:

(gdb) bt
#0  0x401e7a34 in __libc_read () from /lib/libc.so.6
#1  0x80a4594 in ?? ()
#2  0x8054475 in buff_read ()
#3  0x805441b in saferead_guts ()
#4  0x8052df2 in read_with_errors ()
#5  0x8053026 in ap_bread ()
#6  0x8066d32 in ap_get_client_block ()
#7  0x4034a116 in sapi_apache_read_post (
    buffer=0xbfffe028 "Vajf?3\"??0aD?@_\031\210T?\213?ZICtQ1&?ȶ????^?k??@?\216?\026[L\201\"@\005&#190;\200\021x\002R@)\202?\215\210\002\230q\021p?\nq?\006?&#190;R\005f?\024X?N 2?Q\t?\004 \200B<\001H ?\200d\221\034(v?H?\t. +?\200\023\020\223q\034M??8Y'K\001\236?\223\201?&#166;\005Ļ\230\020\207&#188;?1\224??@<&#166;S", count_bytes=3999)
    at /usr/src/web/php/php4/sapi/apache/mod_php4.c:146
#8  0x402fac3a in sapi_deactivate () at /usr/src/web/php/php4/main/SAPI.c:395
#9  0x402f3aa3 in php_request_shutdown (dummy=0x0) at /usr/src/web/php/php4/main/main.c:999
#10 0x4034a66d in php_apache_request_shutdown (dummy=0x0) at /usr/src/web/php/php4/sapi/apache/mod_php4.c:302
#11 0x80518a1 in run_cleanups ()
#12 0x804fec5 in ap_clear_pool ()
#13 0x804ff47 in ap_destroy_pool ()
#14 0x8061943 in child_main ()
#15 0x8061b8a in make_child ()
#16 0x8061c46 in startup_children ()
#17 0x80622dd in standalone_main ()
#18 0x8062b6c in main ()
#19 0x401599cb in __libc_start_main (main=0x80627a8 <main>, argc=1, argv=0xbffff674, init=0x804ecfc <_init>, 
    fini=0x8082e34 <_fini>, rtld_fini=0x4000aea0 <_dl_fini>, stack_end=0xbffff66c)
    at ../sysdeps/generic/libc-start.c:92

 [2003-06-26 18:09 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Nov 28 09:00:01 2025 UTC