Connecting Tech Pros Worldwide Help | Site Map

File uploads with PHP

  #1  
Old July 17th, 2005, 06:41 AM
Gefster
Guest
 
Posts: n/a
I'm writing an uploading page for a website I'm working on. This
website will hopefully allow users to upload files of up to 100MB in
size. The web administrator has increased all the limiting variablies
in php.ini such as:

post_max_size = 150M
upload_max_filesize = 150M
max_execution_time = 600

MAX_FILE_SIZE within the uploading form is also set to 150MB.

However if I try to upload a file greater then 20MB from a PC within
my companys office i get an error message saying that the request is
too large for our web cache. I'm also told that if other users have a
web cache between them and their internet connection they could
experience the same problem.

Does anyone know a way round this problem? Is it possible to bypass
the web cache somehow so that this dosent happen?
  #2  
Old July 17th, 2005, 06:41 AM
Garp
Guest
 
Posts: n/a

re: File uploads with PHP



"Gefster" <gefster@msn.com> wrote in message
news:e89281f1.0406070757.19ae3c02@posting.google.c om...[color=blue]
> I'm writing an uploading page for a website I'm working on. This
> website will hopefully allow users to upload files of up to 100MB in
> size. The web administrator has increased all the limiting variablies
> in php.ini such as:
>
> post_max_size = 150M
> upload_max_filesize = 150M
> max_execution_time = 600
>
> MAX_FILE_SIZE within the uploading form is also set to 150MB.
>
> However if I try to upload a file greater then 20MB from a PC within
> my companys office i get an error message saying that the request is
> too large for our web cache. I'm also told that if other users have a
> web cache between them and their internet connection they could
> experience the same problem.
>
> Does anyone know a way round this problem? Is it possible to bypass
> the web cache somehow so that this dosent happen?[/color]

You need to tell your web cache to increase its upload limit.

If it's Squid, go change your squid.conf (if that's what you use) and alter
request_body_max_size to 0.

HTH
Garp


  #3  
Old July 17th, 2005, 06:42 AM
Markus Ernst
Guest
 
Posts: n/a

re: File uploads with PHP


"Gefster" <gefster@msn.com> schrieb im Newsbeitrag
news:e89281f1.0406070757.19ae3c02@posting.google.c om...[color=blue]
> I'm writing an uploading page for a website I'm working on. This
> website will hopefully allow users to upload files of up to 100MB in
> size. The web administrator has increased all the limiting variablies
> in php.ini such as:
>
> post_max_size = 150M
> upload_max_filesize = 150M
> max_execution_time = 600
>
> MAX_FILE_SIZE within the uploading form is also set to 150MB.
>
> However if I try to upload a file greater then 20MB from a PC within
> my companys office i get an error message saying that the request is
> too large for our web cache. I'm also told that if other users have a
> web cache between them and their internet connection they could
> experience the same problem.
>
> Does anyone know a way round this problem? Is it possible to bypass
> the web cache somehow so that this dosent happen?[/color]

I don't think that HTTP POST is a good way to upload big files, as it does
not give any status bar or whatever and confuses the user even if you manage
to pass the whole files through all the bottlenecks.

I would suggest you to provide an FTP link to the target directory and tell
your users to use Internet Explorer as an FTP client to upload the files
(this is very easy).

HTH
Markus


  #4  
Old July 17th, 2005, 06:42 AM
Gefster
Guest
 
Posts: n/a

re: File uploads with PHP


> You need to tell your web cache to increase its upload limit.[color=blue]
>
> If it's Squid, go change your squid.conf (if that's what you use) and alter
> request_body_max_size to 0.
>
> HTH
> Garp[/color]

Ok that sounds good for my situation from within the company network
but what about users who are behind their own web cache? Is there
anything I can do to bypass their cache or are all types of upload
made them limited by their cache size?
  #5  
Old July 17th, 2005, 06:42 AM
Gefster
Guest
 
Posts: n/a

re: File uploads with PHP


That would be a good solution... there's only one problem. The files
for uploading need to be secure so ftp is not secure enough. A 3rd
party sftp client is needed as IE etc doesnt support this as far as i
know. Also the users dont have administrator rights on thier PCs so
they are unable to install the sftp client!! It's a tricky one this.

Unfortunatly https seems to me to be the only way to do it. Unless
someone knows of another.
  #6  
Old July 17th, 2005, 06:42 AM
Chung Leong
Guest
 
Posts: n/a

re: File uploads with PHP


"Gefster" <gefster@msn.com> wrote in message
news:e89281f1.0406080711.1e765d9d@posting.google.c om...[color=blue]
> That would be a good solution... there's only one problem. The files
> for uploading need to be secure so ftp is not secure enough. A 3rd
> party sftp client is needed as IE etc doesnt support this as far as i
> know. Also the users dont have administrator rights on thier PCs so
> they are unable to install the sftp client!! It's a tricky one this.
>
> Unfortunatly https seems to me to be the only way to do it. Unless
> someone knows of another.[/color]

See www.webdav.org.


  #7  
Old July 17th, 2005, 08:18 AM
Gefster
Guest
 
Posts: n/a

re: File uploads with PHP


WEBDAV could be the answer then. I've heard that this approach may
also suffer from the web cache upload limit. Is that the case?
  #8  
Old July 17th, 2005, 08:18 AM
Ian.H
Guest
 
Posts: n/a

re: File uploads with PHP


On Mon, 19 Jul 2004 04:30:56 -0700, Gefster wrote:
[color=blue]
> WEBDAV could be the answer then. I've heard that this approach may
> also suffer from the web cache upload limit. Is that the case?[/color]


No, the answer is Apples _obviously_!

Confused? ;)



Regards,

Ian


PS: Here's a free clue.... learn how to snip and post correctly.

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload files with php using XAMPP Eduardo Sandino (MadMad) answers 2 February 12th, 2008 02:35 PM
automated upload with PHP Steve Poe answers 9 March 31st, 2007 06:25 PM
Setting up file uploads with php jungabunga answers 13 March 30th, 2007 09:04 AM
File Uploads using <INPUT Type = file...> Mick answers 4 July 23rd, 2005 11:26 PM