Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

uploading large files

Status
Not open for further replies.

feridun

Vendor
Joined
Jul 27, 2004
Messages
5
Location
US
I have recently developed a new website for a client and part of the scope is to upload large files (up to 225 MB) using an HTML form. I have used PHP to do the upload. I have just realized that my client’s hosting allows a max upload size of 5.2 MB. I found this which talks about the exact problem that I have and possible solutions.






I tried solution #3 since the server is setup to run PHP as CGI standalone. I have created and placed php.ini file under every folder and changed the parameters (post_max_size, upload_max_filesize, etc.) but still was not able to make it work .Any ideas, comments or suggestions? I appreciate any help.



Thanks.
 
I just encountered this problem! I might have an answer.

If you're using Apache, there is a directory called /conf.d/ under the same directory as httpd.conf

(in my server, the path is etc/httpd/conf.d/

Within /conf.d/ there is a file called php.conf.
You must edit this file to allow uploading files of the size you want.

Code:
<Files *.php>
  SetOutputFilter PHP
  SetOutputFilter PHP
  LimitRequestBody 2030400000
</Files>

(I believe that '2030400000' is 225MB in bytes... you have to use bytes for some reason...)

I'm sure this should correct your problem.

[cheers]
Cheers!
Laura
 
Oops sorry in the code I had:
Code:
SetOutputFilter PHP
twice.
Should be:
Code:
<Files *.php>
  SetOutputFilter PHP
  SetInputFilter PHP
  LimitRequestBody 2030400000
</Files>

[cheers]
Cheers!
Laura
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top