Cara Mengatasi Max_Execution_Time limit php




Dari judul di atas di atas kita bisa artikan bahwa ada batas eksekusi di script yang diproses pada PHP, jadi untuk mengatasi masalah di atas bisa kita selesaikan dengan mengedit file php.ini.
Yang pertama pastikan anda mengalami masalah ini ya...heeheheee..
Baik langsung saja hal pertama yang anda lakukan:

Set the max_execution_time in your PHP configuration file to the number of seconds that want to allow your PHP scripts to execute.
  1. Edit php.ini file using your favourite editor.
    $ sudo vi /etc/php/7.2/apache2/php.ini
  2. Look for max_execution_time directive.
    ; Maximum execution time of each script, in seconds
    ; http://php.net/max-execution-time
    ; Note: This directive is hardcoded to 0 for the CLI SAPI
    max_execution_time = 30
  3. Change the value for max_execution_time in seconds.
    max_execution_time = 300
    Setting it to 0 will impose no time limit whatsoever to the execution of your PHP scripts.
    It's not recommended to set the value to 0 at this level as this method's system-wide change will cause any misbehaved PHP scripts to unnecessarily consume precious CPU time.
  4. Restart your web server.
    $ sudo systemctl restart apache2

Post a Comment

0 Comments