TUCoPS :: HP Unsorted F :: bx3306.htm

function sleep() in all versions of PHP
function sleep() in all versions of PHP
function sleep() in all versions of PHP



There is a quite big problem with sleep() function in php,
The max_execution_time set to 60sec. in safe mode can be easy passed by using sleep() funcion, for example this script:

Will print hello world after 9999999 seconds... so max_execution_time simply dosnt work :P Why? we can find in manual:
"max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running."
including sleep() :P
We can use this vuln to run out memory on web/php hosting:
');// for 16mb memory limit
      fclose($fp);
      echo "";
   }
?>





TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH