Hi

I'm having trouble with a file upload script running on an NT box php 4.3.4 running as ISAPI

Smaller files are uploading fine but at about 2Mb I get a timeout error saying max_exection time exceeded.

All sounds perfectly fixable - BUT my max upload size is set to 10Mb and my max_execution time to 3000 seconds!

The files appear to be uploading fine - the blue bar in IE goes all the way to the end - and when you expect to see the repsonse page you get the error. Typically <2min. How can this be with a 3000s execution time?

Is there another setting I'm missing, or possibly something server related?

thanks

    hi,

    you can use this code

    <?php

    ini_set("max_execution_time","53523525253");

    // write your code

    ?>

    regards
    bvsureshbabu

      That didn't get it.
      Same result and same error - interestingly the error still refers to the 3000s limit. Whole process took about 100s...

        What exaclty is the error you are getting?

        If your using IIS there is a script timeout setting that needs to be upped.

        You can up the php timeout in code but the IIS timeout needs to be changed using the IIS server manager:

        Increase Server timeout to run scripts (need to transfer alot of data so scripts take a while)

        Microsoft Internet Information Server (IIS) automatically terminates CGI programs that run for more than five minutes. Unfortunately, our document movement can easily use that much when building the cd's, and if IIS terminates it, it may leave the cd partly built and unusable. The solution is to reconfigure the IIS server to increase the CGI timeout to a much larger value. Here's how (instructions are for Windows 2000 Server; other Windows variants may be slightly different):

        1. In the Start Menu, go the Settings menu, and choose Control Panels.

        2. Open the Administrative Tools control panel.

        3. Open the Internet Services Manager item.

        4. Right-click on the computer icon in the left panel and choose Properties from the menu that appears.

        5. Click "Edit..." next to "WWW Services".

        6. Click the "Home Directory" tab.

        7. Click the "Configuration..." button.

        8. Click the "Process Options" tab.

        9. Enter a large value in the CGI script timeout field, perhaps 999999.

        HTH

          We don't have an option that is exactly as you described, but we've found an ASP Script timeout option which we've upped from 90 to 3000. The script still fails after a couple of minutes...

          exact error is:

          Fatal error: Maximum execution time of 3000 seconds exceeded in D:\FTP-Root\LocalUser\Agripix\press\siteAdmin\app_images.php on line 2

            If you have access to the php.ini file I would change the max_execution_time by hand to check and see if that fixes the problem then do some checks with setting the value in code to see if that works.

            if you do this, it should give you back whatever value was in the max_execution_time setting. I had a problem with setting the value to high once and just went with 30000 (I think that's about 8 hours). :

            $setResult = ini_set ( "max_execution_time", "30000");  // increases the script execution time
            
            print $SetResult;
            

            HTH

              Write a Reply...