Max_execution_time change 86900.

  • Hi there. I want to ask for help. Above is the imscp 1.5.3

    Version: 20180516

    my basic php ubuntu 16 php 7.0 has been rewritten everywhere but after 20 minutes my cron job stops.

    error log:

    [Thu May 12 21:00:01.075916 2022] [proxy_fcgi:error] [pid 1699:tid 140102697182976] (104)Connection reset by peer: [client] AH01075: Error dispatching request to : , referer: index.php?admin

    i don't remember being able to upgrade in imscp because it only allows 10,000 seconds there even on ssh it's good but i can't find the right solution. thanks for the help

    1. PHP max_execution_time directive must be between 1 and 10000
  • According to the docs:…hp#ini.max-execution-time

    In command line the max execution time is unlimited. Are you able to run the script through the shell?

    If yes: You can list and edit the crontab for every I-MSCP user:

    1. crontab -l -u vu20XX
    2. crontab -e -u vu20XX
    3. MAILTO=admin@XXX
    4. 13 * * * * /usr/bin/php7.0 /var/www/virtual/XXX/htdocs/script.php > /dev/null
  • Edit the PHP settings for this customer directly in Shell and restart PHP. Check the timeout setting in the Apache2 virtualhost and adjust accordingly.

    But this is only a workarround. Cleaner way would be to run the script directly in the shell/cron and not by curl/wget

  • If you want to allow > 10000 in the gui, change the template


    <td><input type="number" name="max_execution_time" id="max_execution_time" min="1" max="10000" value="{MAX_EXECUTION_TIME}"> <span>{TR_SEC}</span></td>


    <td><input type="number" name="max_execution_time" id="max_execution_time" min="1" max="10000" value="{MAX_EXECUTION_TIME}"> <span>{TR_SEC}</span></td>


  • Code
    1. I get nothing changed caption.


  • What you are trying to do is a complete nonsense... increasing the max_execution_time to a crazy value will only lead to a server crash, if not today it will happen tomorrow.

    What you should do, is to run your script by a cron job locally on the server, by invoking the php command from the shell and by calling your script directly (not passing through the webserver).

    Running php through shell, isn't affected by max_execution_time limit.

    But if you still want to persist with your crazy idea, there's a listener for your needs:…

  • I tried but it doesn't start. My basic php version of ubuntu 16 is php 7.0

    1. 24 11 22 * * root /usr/bin/php7.0 --user="*******" --password="********" /var/www/virtual/
  • What happens if you run it directly through shell without using the crontab ?

    What happens if you run

    1. /usr/bin/php7.0 --user="*******" --password="********" /var/www/virtual/

    Btw, what are --user and --password for ?

  • )

    Mi történik, ha közvetlenül a shell-en keresztül futtatja a crontab használata nélkül?

    Mi történik, ha futsz

    1. /usr/bin/php7.0 --user="*******" --password="********" /var/www/virtual/ index.php?country=DE

    Btw, mire való a --user és a --password?

    .htaccess login.