473,770 Members | 6,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why would a large not upload, when a small does, when it is still within the POST limit?

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 set the POST limit in php.ini to 8 megs.

What reasons, other than the POST limit, would a large upload fail?

Jan 9 '06
16 4986

Jim Michaels wrote:
if you're uploading to a database, are you using MEDIUMBLOB or LONGBLOB for
a data type?
No, we are not uploading to a database. We are just uploading files
from our personal computers to the web server, where they are stored as
flat files.

"lawrence k" <lk******@geoci ties.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .

Andy Hassall wrote:
On 8 Jan 2006 03:08:20 -0800, "lawrence k" <lk******@geoci ties.com>
wrote:

>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.

The single most annoying phrase when describing problems, if not
followed by
details. In what way did it not work?


Sorry, here is what is happening. If, in FireFox 1.5, I login to the
control panel, and I try to upload a small jpeg image, 234k, it uploads
without a problem. If, on the other hand, I try to upload an 8 meg PDS
file, I instantly (no attempt at upload) get this FireFox message:

The connection was reset
The connection to the server was reset while the page was loading.
* The site could be temporarily unavailable or too busy. Try
again in a few
moments.
* If you are unable to load any pages, check your computer's
network
connection.
* If your computer or network is protected by a firewall or
proxy, make sure
that Firefox is permitted to access the Web.

In Internet Explorer, uploading the small file is no trouble, but
uploading the big one gives me this:

The page cannot be displayed
The page you are looking for is currently unavailable. The Web site
might be experiencing technical difficulties, or you may need to adjust
your browser settings.


Following the advice of others on this thread we (or rather, Matt
Clark, our Linux guy) have edited the php.ini file to allow 50 meg
uploads. We also looked through the config file for Apache and saw
nothing there that might have limited uploads. But the problem
persists.
What error did you get? You checked for errors and have error reporting
turned
on, right?


I'm not sure, but I don't think I have access to the errors on the
server. I'm sure Matt does though, so I'll ask him to send me these
logs.


Jan 26 '06 #11

Andy Hassall wrote:
Our Linux guy, Matt Clark, checked for errors. He said there were no
errors in the PHP log.


That's one log down, then. What about the others?

Hint:
What reasons, other than the POST limit, would a large upload fail?

Various. Almost all of which produce errors, either in the form of PHP errors,
Apache errors or the field in $_FILES.


I don't suppose you'd know what these error files are typically called,
do you? I asked our server guy to send me the PHP error logs and he
said that PHP had only recently invented server logs, and that I
probably wanted the syslogs instead. Then he send a whole bunch of
files, with names like ssl_error_log.1 and suexec_log and error_log.2.
These have line after line that look like this:

[Mon Jan 09 11:18:38 2006] [error] [client 212.126.96.21] File does not
exist: /home/httpd/vhosts/default/htdocs/phpMyAdmin-2.6.0-pl1
[Mon Jan 09 11:18:39 2006] [error] [client 212.126.96.21] File does not
exist: /home/httpd/vhosts/default/htdocs/phpMyAdmin-2.6.3-pl1
[Mon Jan 09 11:18:39 2006] [error] [client 212.126.96.21] File does not
exist: /home/httpd/vhosts/default/htdocs/phpMyAdmin-2.6.3
[Mon Jan 09 11:18:39 2006] [error] [client 212.126.96.21] File does not
exist: /home/httpd/vhosts/default/htdocs/phpMyAdmin-2.6.3-rc1
[Mon Jan 09 11:18:39 2006] [error] [client 212.126.96.21] File does not
exist: /home/httpd/vhosts/default/htdocs/phpMyAdmin-2.6.2-rc1
[Mon Jan 09 11:21:08 2006] [notice] Graceful restart requested, doing
restart
Warning: DocumentRoot [/home/httpd/vhosts/grandingardens. com/httpdocs]
does not exist
[Mon Jan 09 11:21:14 2006] [notice] Digest: generating secret for
digest authentication ...
[Mon Jan 09 11:21:14 2006] [notice] Digest: done
[Mon Jan 09 11:21:15 2006] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Mon Jan 09 11:21:15 2006] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Mon Jan 09 11:21:15 2006] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Mon Jan 09 11:21:16 2006] [notice] Apache/2.0.46 (Red Hat) configured
-- resuming normal operations
[Mon Jan 09 11:36:07 2006] [notice] Graceful restart requested, doing
restart
[Mon Jan 09 11:36:07 2006] [notice] Digest: generating secret for
digest authentication ...
[Mon Jan 09 11:36:07 2006] [notice] Digest: done
[Mon Jan 09 11:36:08 2006] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Mon Jan 09 11:36:08 2006] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Mon Jan 09 11:36:08 2006] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Mon Jan 09 11:36:08 2006] [notice] Apache/2.0.46 (Red Hat) configured
-- resuming normal operations
[Mon Jan 09 11:38:00 2006] [error] [client 66.249.65.106] File does not
exist: /home/httpd/vhosts/default/htdocs/robots.txt
[Mon Jan 09 11:42:51 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/awstats
[Mon Jan 09 11:42:53 2006] [error] [client 202.90.149.5] script not
found or unable to stat: /home/httpd/vhosts/default/cgi-bin/awstats.pl
[Mon Jan 09 11:42:54 2006] [error] [client 202.90.149.5] script not
found or unable to stat: /home/httpd/vhosts/default/cgi-bin/awstats
[Mon Jan 09 11:42:56 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/xmlrpc.php
[Mon Jan 09 11:42:57 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/blog
[Mon Jan 09 11:42:59 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/blog
[Mon Jan 09 11:43:00 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/blogs
[Mon Jan 09 11:43:01 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/drupal
[Mon Jan 09 11:43:02 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/phpgroupware
[Mon Jan 09 11:43:03 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/wordpress
[Mon Jan 09 11:43:05 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/xmlrpc.php
[Mon Jan 09 11:43:06 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/xmlrpc
[Mon Jan 09 11:43:07 2006] [error] [client 202.90.149.5] File does not
exist: /home/httpd/vhosts/default/htdocs/xmlsrv

I don't see anything in here that might tell me why large files are
failing to upload. I have been able to upload a file of less than 1
meg, but anything larger than that seems to fail. In FireFox I get a
"Connection reset by the server" message.

Feb 16 '06 #12
On Wed, 15 Feb 2006 19:46:10 -0800, lawrence k wrote:

Andy Hassall wrote:
>Our Linux guy, Matt Clark, checked for errors. He said there were no
>errors in the PHP log.


That's one log down, then. What about the others?

Hint:
>>>What reasons, other than the POST limit, would a large upload fail?
>>
>> Various. Almost all of which produce errors, either in the form of
>> PHP errors,
>>Apache errors or the field in $_FILES.


I don't suppose you'd know what these error files are typically called, do
you?


PHP can be told not to log errors, or if not that, to log them in various
ways (syslog, or Apache's log files, or to a specif one of your choosing).

So first look at php.ini and make sure that "log_errors = On" in there.
On my setup that is all that is needed for PHP errors to be written to
Apache's error_log file. The files called error_log.2 and so on are older
versions made when the logs get "rotated".

The logs have times in them so obviously you need to find the file that
has errors timed at the time you have provoked the error.

Elsewhere in php.ini is a setting to control where errors get logged
(error_log = ...). If you can set this to the name of a file on the
server that you can read, then you won't need to be sent the logs.
Setting it to "syslog" will make PHP error get logged to the same place as
almost everything else on the server and will just make yours very hard to
find, so make sure it is either commented out (errors go to Apache logs)
or it is set to file specifically for PHP errors (the more useful setting).

--
Ben.

Feb 16 '06 #13
On 15 Feb 2006 19:46:10 -0800, "lawrence k" <lk******@geoci ties.com> wrote:
Andy Hassall wrote:
>Our Linux guy, Matt Clark, checked for errors. He said there were no
>errors in the PHP log.
That's one log down, then. What about the others?

Hint:
>>>What reasons, other than the POST limit, would a large upload fail?
>>
>> Various. Almost all of which produce errors, either in the form of PHP errors,
>>Apache errors or the field in $_FILES.


I don't suppose you'd know what these error files are typically called,
do you? I asked our server guy to send me the PHP error logs and he
said that PHP had only recently invented server logs, and that I
probably wanted the syslogs instead. Then he send a whole bunch of
files, with names like ssl_error_log.1 and suexec_log and error_log.2.
These have line after line that look like this:

[Mon Jan 09 11:18:38 2006] [error] [client 212.126.96.21] File does not
exist: /home/httpd/vhosts/default/htdocs/phpMyAdmin-2.6.0-pl1


[snip]
I don't see anything in here that might tell me why large files are
failing to upload.
So, do the timestamps in the logfile correspond to times you tried to upload
files?

error_log is the main Apache error log file (by default anyway) and is the
most likely one to contain the answer.

error.log.2 would be an old log file, as further indicated by the timestamps
on the errors you posted being several weeks ago.

Upload a file. Check the end of error_log for new messages.
I have been able to upload a file of less than 1
meg, but anything larger than that seems to fail. In FireFox I get a
"Connection reset by the server" message.


What I'm trying to steer you towards is the Apache error log (which you seem
to have found now, or at least are close), because I bet you have an error in
there similar to:

[Wed Jan 25 23:14:11 2006] [error] [client 192.168.1.14] Requested
content-length of 3191154 is larger than the configured limit of 3000000,
referer: http://server.localhost/~andyh/file_upload.php

This is the most likely cause of the problem I can think of that matches the
symptoms you describe.

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Feb 16 '06 #14

Andy Hassall wrote:
What I'm trying to steer you towards is the Apache error log (which you seem
to have found now, or at least are close), because I bet you have an error in
there similar to:

[Wed Jan 25 23:14:11 2006] [error] [client 192.168.1.14] Requested
content-length of 3191154 is larger than the configured limit of 3000000,
referer: http://server.localhost/~andyh/file_upload.php

This is the most likely cause of the problem I can think of that matches the
symptoms you describe.


That error would make sense, and that is what I first assumed. Still,
we've edited the php.ini file to allow 100 meg uploads, so an error of
that kind is impossible, yes? For an 8 meg PDF file, say?

You can see the output of the phpinfo() command here:

http://www.publicdomainsoftware.org/info.php

Note that it says:

post_max_size 100M

Are there any other settings that would limit the size of uploads?

Thanks for all your help.

Feb 17 '06 #15
On 16 Feb 2006 19:49:48 -0800, "lawrence k" <lk******@geoci ties.com> wrote:
Andy Hassall wrote:
What I'm trying to steer you towards is the Apache error log (which you seem
to have found now, or at least are close), because I bet you have an error in
there similar to:

[Wed Jan 25 23:14:11 2006] [error] [client 192.168.1.14] Requested
content-length of 3191154 is larger than the configured limit of 3000000,
referer: http://server.localhost/~andyh/file_upload.php

This is the most likely cause of the problem I can think of that matches the
symptoms you describe.


That error would make sense, and that is what I first assumed. Still,
we've edited the php.ini file to allow 100 meg uploads, so an error of
that kind is impossible, yes?


No. The error above is an Apache error in response to an Apache configuration
setting. Search Google to find out what it is, after you find it in your Apache
error log.

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Feb 17 '06 #16

Andy Hassall wrote:
On 16 Feb 2006 19:49:48 -0800, "lawrence k" <lk******@geoci ties.com> wrote:
Andy Hassall wrote:
What I'm trying to steer you towards is the Apache error log (which you seem
to have found now, or at least are close), because I bet you have an error in
there similar to:

[Wed Jan 25 23:14:11 2006] [error] [client 192.168.1.14] Requested
content-length of 3191154 is larger than the configured limit of 3000000,
referer: http://server.localhost/~andyh/file_upload.php

This is the most likely cause of the problem I can think of that matches the
symptoms you describe.


That error would make sense, and that is what I first assumed. Still,
we've edited the php.ini file to allow 100 meg uploads, so an error of
that kind is impossible, yes?


My bad. The problem now seems to have something to do with the T1 that
runs to our office, or the firewall we put in or something. We called
Rackspace, from whom we lease our web server, and asked them about this
problem, and the guy on the phone said he could upload files from where
he was. Then he called some of his co-workers who were not working and
asked them to log in from their homes (they are not kidding when
Rackspace talks about Fanatical Support). Other folks did not have a
problem. I then logged in using my laptop on a dial up line, and I was
able to upload a 3 meg problem. So the problem is maybe with our
firewall or T1. In retrospect, it occurs to us the problem started
about when the T1 got put in. We were confused on this issue because
early on we asked a friend up in New York to try it and they also had
trouble. Perhaps they also ran into firewall trouble up where they
were.

Thanks for all the help. We should have checked from more sources early
on. My bad.

Feb 18 '06 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
5888
by: CSN | last post by:
Is it possible to iterate over an array in plpgsql? Something like: function insert_stuff (rel_ids int) .... foreach rel_ids as id insert into table (rel_id, val) values (id, 5);
6
2236
by: Ramesh | last post by:
Hi, We are receiving an error 'The operation has timed out' when our ASP.NET application on Web Server stores large files 10MB+ on the App Server using HTTP PUT. This is a Server to Server communication. This works fine with 4-5 MB files though. Also there is a 15 mb shared bandwidth limitation. how can we throttle/control the transfer rate to see that we are within the bandwidth limits ? Any help is highly appreciated
6
3617
by: Paul | last post by:
Hi there, When adding a "File Field" HTML control to an aspx page to facilitate file uploading, the following occurs: 1. You select a file that is larger than the allowed size limit. 2. Once the user selected the too large file, the page is redirected to a "page not found" error page. 3. This is as per the docs, but my question is:
10
3533
by: erin.sebastian | last post by:
Hello Everyone, I have code that uploads files in asp. It seems to be working however on files > 200kb it bombs and i don't know why. Does anyone have any idea of why this would occur and what i can do to fix it? Thank you in advance!!!!
2
552
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 set the POST limit in php.ini to 8 megs. What reasons, other than the POST limit, would a large upload fail?
14
1957
by: Bryan Parkoff | last post by:
Do you know that current C++ Compiler limits to 64KB segments in source code? It is good news that Microsoft Visual C++ 2005 has expanded to 4GB segments in source code. 4GB segment is ideal for large object using pointer to function and switch. Please list other C++ Compilers if they have added a support of 4GB segments. I am able to write 65,536 functions and 65,536 function's memory address is stored into pointer to function list. ...
20
4285
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site is structured as an upside-down tree, and (if I remember correctly) never more than 4 levels. The site basically grew (like the creeping black blob) ... all the pages were created in Notepad over the last
21
34438
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most obvious of which is the sharing of files. For example, you upload images to a server to share them with other people over the Internet. Perl comes ready equipped for uploading files via the CGI.pm module, which has long been a core module and allows users...
6
4866
by: howa | last post by:
Suppose the file is stored in "upload_tmp_dir ", so why I need to increase the memory limit? If I want to upload 100 MB, how large should I set? Thanks.
5
3289
by: camphor | last post by:
hi, I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is _uploadedfiles_xxxx) (php must be allowed to move uploaded files to this folder' - uploadedfiles_xxxx. I typed <?php chmod ('_uploadedfiles_xxxx',640); ?> into notepad and saved it as php in the uploaded_xxxx folder, when I went to test it, the error...
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10230
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10058
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9870
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.