Hi,
I have a file named uploadform.php.
Basically it uploads file using the HTTP.
When I try to upload 5 files, each about 15M, it will show the fatal error. If I try to upload just 2 of them, it's fine.

The error:
Fatal error: Maximum execution time of 5000 seconds exceeded in E:\WWW\sems\uploadform.php

However, I have just waited for less than 3 minutes, and the error appear. Any suggestions?

    Try to push some text to the browser.

    Ie.

    for($i=0;$i<count($files);$i++)
    {
    //upload file
    echo $filename ." Uploaded<br>";
    flush(); //push text to the browser
    }

    doesnt always work, but it may help you.

    Cheers

      Hi,
      I tried that already. But it didn't help.
      It never even display anything.

      Here's my code:

      <?
      session_start();
      set_time_limit(0);
      ?>
      <html>
      <head>
      <title>HTTP Uploading</title>
      </head>
      <body>

      uploadform.php

      <?
      $action = $_POST[action];
      $dir = "./dump/";

      if ($action == "submitfiles") {
      $totaldoc = count ($FILES ['doc']['name']);
      for ($v=0; $v<$totaldoc; $v++) {
      $doc_name = $
      FILES['doc']['name'][$v];
      if ($doc_name != "") {
      $doc_name = stripslashes($doc_name);
      print "$doc_name<br>";
      $doc_tmp = $_FILES['doc']['tmp_name'][$v];
      move_uploaded_file ($doc_tmp, "$dir/$doc_name");
      }
      }
      }

      ?>

      <form method="post" action="uploadform.php" enctype="multipart/form-data">
      <INPUT TYPE="File" Size="60" name="doc[]"><BR>
      <INPUT TYPE="File" Size="60" name="doc[]"><BR>
      <INPUT TYPE="File" Size="60" name="doc[]"><BR>
      <INPUT TYPE="File" Size="60" name="doc[]"><BR>
      <INPUT TYPE="File" Size="60" name="doc[]"><BR>
      <INPUT TYPE="File" Size="60" name="doc[]">
      <input type="hidden" name="action" value="submitfiles">
      <br><input type="submit" name="next" value="Submit">
      </form>
      </body>
      </html>

        have you tried doing the files in a different order?
        it might just be that one file that it is having trouble with.

          Hi, is there such possibilities that problems lies with the file?
          Anyway I tried to upload each file at a time and it's ok.

          BTW, I'm running on Win2k server, IIS5.0, PHP4.3.1.

            maybe check out in your php.ini about your maximum upload and maximum post and specially the maximum execution in browser

              Hi,
              have check that.

              ================

              php.ini

              max_execution_time = 3000
              post_max_size = 500M
              memory_limit = 16M
              upload_max_filesize = 990M

                Write a Reply...