php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17978 Large file upload doesn't work remotely
Submitted: 2002-06-25 14:52 UTC Modified: 2002-07-05 14:13 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: daniel at pop3web dot com dot br Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.2.1 OS: Windows 2000 Server
Private report: No CVE-ID: None
 [2002-06-25 14:52 UTC] daniel at pop3web dot com dot br
I'm trying to make a page for file uploads. For small files, everything goes ok, but doesn't work when I try to upload large files.

The limit size for uploading is suposed to be 100Mb. I've set up my php.ini with this config:

post_max_size = 100M
memory_limit = 128M
upload_max_filesize = 100M

When I access through http://localhost/upload.htm, and post a large file, Ok. But if I access the page remotely, or even locally, but using my LAN IP Address (http://192.168.0.15/upload.htm) and post a large file, either browser stays as is (hangs) or, most commonly, the browser shows a "server not found"/"page cannot be displayed" page, instantly. But, as I sad, this problem occurs only when posting large files.

Additional config:
Browsers: Internet Explorer 6 and Netscape 7 (netscape pops a "document contained no data" message)
Server API: CGI
PHP Version: 4.2.1
Server Software: Microsoft-IIS/5.0

Here goes the scripts:

// ----- upload.htm ------ //
<form action="upload.php" method="post" enctype="multipart/form-data" name="form1">
  <p> <input type="hidden" name="MAX_FILE_SIZE" value="102400000">
    <input name="file_name" type="file" id="file_name">
  </p>
  <p> 
    <input type="submit" name="Submit" value="Send">
  </p>
</form>


// ----- upload.php ------ //

<?php
	$temp_file_name = $HTTP_POST_FILES['file_name']['tmp_name'];
	$original_file_name = $HTTP_POST_FILES['file_name']['name'];
	move_uploaded_file($temp_file_name, $original_file_name);
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-26 15:20 UTC] daniel at pop3web dot com dot br
As I think it may happen, whan uploading a file bigger than 500k, the web browser shows the URL:

res://C:\WINNT\System32\shdoclc.dll/dnserror.htm#http://192.168.0.15:1080/teste.php

Thanks in advance for any help.
 [2002-07-05 14:13 UTC] sniper@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.


Not likely any problem with PHP but IIS/Windows..etc.

 [2002-12-19 22:12 UTC] xjpmauricio at netcabo dot pt
i used to have the same problem but now i receive 200M uploads on my apache server running on php4.3orc3
I?ve changed my php.ini file like this:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 0 
max_input_time = 0
memory_limit = 8M 

;Maximum size of POST data that PHP will accept.
post_max_size = 240M

file_uploads = On

; Maximum allowed size for uploaded files.
upload_max_filesize = 240M

it has been working fine 4 me!!! my server is in portugal and i have received 200Mb file from a friend in Canada!
it shoul work 4 u!...
 [2003-07-23 10:25 UTC] oxis at sodge dot org
Hy,

i had the same problem. I thought, something is wrong with my mySQL-config or PHP-config.

But, after scrambling the internet, i recocnized that more people have the same problem.

The thing is, that the Microsoft InternetExplorer only send PostVars till an size up to 1024 kByte. I noticed this behaviour with IE 6.0 (with SP1 and without) all IE 5.X.

I used ethereal to check the sended headerfiles and noticed, that the IE does NOT send anything, if an file upload is done with an filesize over 1024 kBytes.

So the only thing is, change your browser !!

Forother solutions, i would be happy, please send at oxis@sodge.org
 [2003-08-11 10:34 UTC] csweetland at kellymoore dot com
Hi,

I had the same problem...with the change in the Apache config files, you'll need to make one more change...

I had to change the setting in /etc/httpd/conf/d/php.conf
 
LimitRequestBody 524288
---which is 512k, to a higher size. Example below is for 8meg
LimitRequestBody 8388608

Site note:  I'm using RedHat 9 with php 4.2.x

-- Carl
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 28 05:01:28 2024 UTC