We help IT Professionals succeed at work.

Uploading more than 30MB to Apache server

mte01
mte01 asked
on
Medium Priority
434 Views
Last Modified: 2012-05-05
Hey experts,

  I am uploading a file to an Apache server; my file is more than 30 MB. I am using PHP's move_uploaded_file function to upload the file., but it's not working....any idea why and how can I solve it if possible??
Comment
Watch Question

Top Expert 2008
Commented:
Check the following php.ini settings:

post_max_size
upload_max_filesize
memory_limit

while post_max_size must be higher than upload_max_filesize and memory_limit must be higher than post_max_size.

For Apache, check if the directive LimitRequestBody is used in your httpd.conf (if not, the request body should be unlimited per default).

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
sorry this didnt work... and i didnt find the variable LimitRequestBody in the httpd.conf file
any idea why??
Hi,

You have to put an .htaccess file in the same dir as my upload script and put in the line:
LimitRequestBody 367001600

i hope it may help you

R.K
CERTIFIED EXPERT
Commented:
Also check max_execution_time and max_input_time; see:

http://us2.php.net/manual/en/features.file-upload.common-pitfalls.php
CERTIFIED EXPERT

Commented:
Which version of Apache are you running?  Apparently, this might be in something like:

/etc/httpd/conf.d/php.conf

for certain Redhat versions.
please check your erro_log and post relevant messages
Top Expert 2015

Commented:
any error from apache error log?

Author

Commented:
guys,...I'll be trying this tomorow, and I'll inform you of the results...

Author

Commented:
hi again, there is nothing at all in the log files.
LimitRequestBody 367001600 in the .htaccess didn't change anything

i am using windows server 2003 and wamp server 5,
thanks for the efforts.
Best,  
Top Expert 2015

Commented:
WAMP Version?

Author

Commented:
WAMP5
version: 1.4.5
Best
Top Expert 2015
Commented:
in php.ini change upload_max_filesize and post_max_size to your preference.
make sure post_max_size is smaller than memory_size.

Author

Commented:
Hi gheist
this was already proposed by caterham_www, dont know if you mean by memory_size the memory_limit for i didnt find the variable memory_size in the PHP.ini file
guys, do u think that the problem can be caused by a firewall or some settings in the computer's operating system? (win server 2003)

thanks
> do u think that the problem can be caused by a firewall or some settings in the computer's operating system?
i.g. yes
as already suggested, I'd first check the web server configuration and the web server log files, then trace the problem down to the OS or up to the application (PHP)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.