I have a script that is timing out on a server that runs the commercial webserver software Zeus (not my choice!)
PHP is run in cgi mode
htaccess partially works but some settings are just ignored

I can do
set_time_limit(0) ;
and it shows as being changed ..
but I can't seem to override
max_input_time

(of course max_input_time may not be the culprit.. but it shows as '60')

I have tried via php.ini with
max_input_time = 903

and have tried
ini_set('max_input_time','902');

(different numbers so I can see if anything takes)
but no luck - script times out after about 3 minutes (ftp transfer of images etc)

Host hasn't replied yet..

Am I out of luck on this?
I have a potential workaround but would rather not have to do it.

ps:
script is triggered to run via a curl call from my own site because stupid Zeus install doesn't support cron of any sort..

    m@tt;11001452 wrote:

    Check the Runtime Configuration

    I believe what you are looking for is max_execution_time

    I doubt it, only because:

    cretaceous;11001448 wrote:

    I can do
    set_time_limit(0) ;
    and it shows as being changed ..

    cretaceous;11001448 wrote:

    ps:
    script is triggered to run via a curl call from my own site because stupid Zeus install doesn't support cron of any sort..

    Huh? Executing a PHP script via a cron job has nothing to do with what software you're using for the webserver (or if you even have a webserver installed at all). Can you elaborate as to why you can't use a cron job (if that's a better fit for what you're trying to do)? I only ask because it would potentially reduce the complexity of the problem since the Zeus webserver daemon wouldn't even be involved anymore.

    Either way, have you made sure that PHP's error reporting is set to E_ALL (or better) and enabled error logging? If so, have you tried examining both PHP's error log and Zeus' error log to look for clues as to why the script was terminated?

    We could guess all day about which directive/setting to change in PHP and/or Zeus, but if one or the other is terminating the script for one reason or another, I'd have a hard time believing that no trace would be left behind (e.g. in an error log).

      I don't think that's it
      I'm pretty sure "set_time_limit(0) ;" overrides the max_execution_time value
      that's in reply to matts answer

        You aren't providing any code or errors so we can't really help. You mentioned using FTP and cURL so perhaps you need to look into setting timeouts for these?

        ftp_connect has a timeout setting

        curl_setopt also has a timeout setting (CURLOPT_CONNECTTIMEOUT and CURLOPT_TIMEOUT)

          I know that how the script is executed has now't to do with it, but thought I would disclose all facts.
          Zeus webserver (at least at this host) does not support cron or have an equivalent - they want you to upgrade to their VPS. (I did tell client this host was not a good choice... )

          Error reporting is set to E_All and there are no errors to screen
          I don't have access to any logs
          I will try error logging and ftp timeout

          thanks for the pointers

            If you try to set the max_input_time via ini_set(), it's too late. It has to be set in either the php.ini config or a local config, such as via .htaccess. (That's what the "PHP_INI_PERDIR" means when you see it in the manual pages for a given setting. ini_set() will only be useful if it says "PHP_INI_ALL".)

            It makes sense, since it has to do with the stuff PHP does to load GET/POST data before your script actually starts processing.

              setting ftp_timeout value has solved this
              (I did try .htaccess but Zeus ignores a lot of directives)
              thanks all

                Write a Reply...