473,395 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Server quits when upload exceeds 60 seconds

My file upload page stops processing after 60 seconds, then Browser displays: "CANNOT FIND SERVER" .

The Hosting company tech support people say: “The way around this is to return some data periodically. Maybe every 10-15 seconds return some data back so that the server knows that the script is still alive and working. That should get around the 60 second timeout.”

I have searched the Web for example of this, with no luck. Not even sure exactly what to look for. Can anyone provide some guidance on how to add what tech support suggested?

Here’s what I have so far (which works fine on small files):

Here's the HTML Upload form ###########################

Expand|Select|Wrap|Line Numbers
  1. <form enctype="multipart/form-data" action="../admin/file.catcher.admin.php" method="POST">
  2.  
  3.      <input type="hidden" name="MAX_FILE_SIZE" value="400000" />            
  4.     <input type="hidden"  name="max_input_time" value="10000" />
  5.  
  6.     <p>Upload a File</p>
  7.  
  8.     <p>File Name: &nbsp;<input name="userfile" type="file" /> &nbsp;
  9.     <input type="submit" value=" Upload File Now " /></td>    
  10.  
  11. </form>
  12.  
  13. Here's the PHP form handler ############################
  14.  
  15. <?
  16.  
  17. $uploaddir = '/ - absolute path here - /';
  18. $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
  19.  
  20. echo '<pre>';
  21. if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
  22.    echo "File successfully uploaded.\n";
  23. }
  24.  
  25. else {
  26.    echo "Upload Error!\n\n";
  27.  
  28. echo "
  29.  
  30. ";
  31. print_r($_FILES);
  32.  
  33. print "</pre>";
  34.  
  35. }
  36.  
  37. }
  38.  
  39. ?>
Aug 3 '06 #1
1 1540
Markus
6,050 Expert 4TB
Check out set_time_limit().
Apr 18 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

23
by: BlackHawke | last post by:
Hello! This is my second post. Ppl really helped me with the first. I hope there are answers for this one as well I own a game company (www.aepoxgames.net) releasing the beta for our first...
2
by: Lyn Duong | last post by:
hi all, I am trying to create a dts package to transfer data from tables in my sql server 2000 database to a db2 UDB v8.1.4 database. When I use ibm db2 oledb driver for the destination this...
1
by: paras | last post by:
I am using File Upload Control to upload file on server. If size of the file exceeds maxRequestLength property in httpRuntime section of my configuration file, then DNS error is thrown. how can i...
14
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if the file selected is too big. I do know about the...
4
by: brian.digipimp | last post by:
So I wrote this upload script and I keep getting errors and can't get it to work. I'm running ubuntu linux and here is my code: <html> <head> <title>Upload</title> </head> <body> <?php
2
by: lawrence k | last post by:
I've a file upload script on my site. I just now used it to upload a small text document (10k). Everything worked fine. Then I tried to upload a 5.3 meg Quicktime video. Didn't work. I've...
5
by: pbd22 | last post by:
Hi. I am trying to poll a long-running process via a hidden IFrame. I am noticing that the online errata gives advice for handling a server response: window.parent.handleServerResponse(); ...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
1
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.