set_time_limit() function

  • Good morning,


    On our forum, there is a "search" function.


    See set time_limit nicht erlaubt

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • i-MSCP sets the default value for the max_execution_time directive using php_admin_value to prevent customers to raise it. If you want make your customer PHP scripts able to change the value at runtime, that is, through the set_time_limit() PHP function, you need change the php_admin_value statement to php_value. Once done, the PHP script will be able to make use of the set_time_limit() function to raise the value. The way to process depends on the i-MSCP httpd server implementation you're using... For FPM, you need to edit the pool configuration file of the targeted site and at bottom, change the statement as explained above. Once done, you need to reload the FPM instance.


    For instance, if you make use of the FPM httpd server implementation, you need change the line

    Code
    1. php_admin_value[max_execution_time] = 30

    to

    Code
    1. php_value[max_execution_time] = 30

    in the FPM pool configuration file that belongs to your site.


    If you want make the change persistent, and assuming you're using either the FPM or FCGID httpd server implementation, you should use the following i-MSCP listener file: https://github.com/i-MSCP/imsc…p_confoptions_override.pl

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206