Greetings all-
I have a form that allows a user to upload a zip file. Over the years the program has worked fine, but these zip files keep getting larger and larger. Now the file is at 75MG. When loading this file in testing, it stops after about 60 seconds. I'm getting a message on the webpage: The connection to the server was reset while the page was loading.

I added code to stop the script before the actual processing of the file contents. I print out the name of the uploaded file and the file size then exit the program. I can print out the lines for smaller files, but not the 75MB file. grrrr!

In php.ini, I set:
upload_max_filesize 80M
php_value post_max_size 80M

I also added to my script:
set_time_limit(180);

I used a window on the server to view memory usage while the upload runs and the process shows 0.7 in MEMORY.

At this point I'm not sure what the problem is, memory, time-out, other(?). Any ideas of what I could try would be appreciated.

Cheers!
JC

    jdc44 wrote:

    In php.ini, I set:
    upload_max_filesize 80M
    php_value post_max_size 80M

    Well there's two problems I see with that... 1) php.ini uses "key = value" to define directives, so you're missing an '=' in that first line, and 2) php_value is used in .htaccess files only, never in php.ini.

    You might try fixing that and then doing a phpinfo() to verify that the directives show the correct value. If it's still timing out right at 60 seconds, check to see what your webserver's timeout setting is set to.

      5 days later

      I figured this out:
      The entries for sizes were in an httpd.conf file. We do this so we can set limits per directories as needed.

           <Directory "[path/to/this/directory]"> 
              php_value upload_max_filesize 90M 
              php_value post_max_size 90M 
              php_value max_execution_time 200 
              php_value max_input_time 200 
          </Directory> 
      

      Adding the last two lines allowed this to work.

          php_value max_execution_time 200 
          php_value max_input_time 200 
      

      in my upload form, I added this hidden field:

      <input type="hidden" name="MAX_FILE_SIZE" value="84000000" /> <!-- loosely 80 MB --> 
      

      In the processing script, I added these lines, although now, they may not be necessary:

      set_time_limit(200); 
      ini_set('memory_limit','256M'); 
      

      Credit goes to a forum site I found while endlessly searching for a fix to this bug:
      http://www.joomlaholic.com/index.php?option=com_kunena&Itemid=6&func=view&catid=4&id=30734&limit=6&limitstart=6#31836

      Thanks to all.
      matman

        Okay, help. I have marked this thread as RESOLVED, but it is not showing as such in the thread list. How do I get to show as resolved? Thanks.

          matman;10926304 wrote:

          Okay, help. I have marked this thread as RESOLVED, but it is not showing as such in the thread list. How do I get to show as resolved? Thanks.

          You aren't the creator of this thread, therefore you can't mark it resolved. :p

            Apparently I have two user names. Thanks for catching that.

              Write a Reply...