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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Large file upload gives 404 1

Status
Not open for further replies.

gmail2

Programmer
Jun 15, 2005
987
IE
I've written a script which uploads a csv file and then inserts records into MySQL (after a little modification). This worked fine on our test server, but when we moved it to our live server it gives a 404 on large files(7MB). The limit in php.in is 18MB so that's not the problem. Can anybody shed any light on why this is happening? Is it a PHP thing or an apache thing? PHP version is 4.2 and apache version is 2. Register Globals is turned on on the live server (where this error is occurring) but not on the test one - but it can't be anything to do with that surely?
 
It could be either a PHP or an Apache thing.

In php.ini, check [tt]upload_max_filesize[/tt] and [tt]post_max_size[/tt]. To upload large files, the second setting must be larger than the first.

In httpd.conf, check the setting [tt]LimitRequestBody[/tt] ( If you don't have this setting appearing at all in httpd.conf, it's okay. The default is "no limit".



Want the best answers? Ask the best questions! TANSTAAFL!
 
I do not think that the setting of register_globals will have an effect on the size of files you can upload. But it will have an effect on the security of your system.

I strongly recommend that you set register_globals to "off" on your production server, too. See "Using Register Globals" in the PHP online manual:


Want the best answers? Ask the best questions! TANSTAAFL!
 
Yea we just got it working just as you posted !! It was the LimitRequestBody in httpd.conf

As for Register Globals - I have no control over the server, I just wrote this for somebody else, it's their servers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top