开发者

Raise Upload Limit

I have a PHP web application and where users a upload files. I need to raise the limit to 2gb on my VPS that has 512mb of memory and 256mb of swap space. I have tried raise the limit by changing upload_max_filesize and post_max_size. It works when I raise the limit to 150mb, but not when I change it to 250mb. Any idea what is limiting it?

**UPDATE

My host is linode and I am running the 512mb VPS.

I am running Ubuntu 10.04 and am using apache2 with the default settings. I am 开发者_开发知识库changing the limit in my .htaccess file.


Probably your host is limiting you. 512MB is very small amount of RAM for a server, so they restricted it to prevent crash or something.


Please note: 1. Your VPS may have limitation about disk space that it can use and that may cause the error 2. That post_max_size must be a little bigger than upload_max_filesize because of the encoding and POST's additional data. For example if you have:

upload_max_filesize = 100M

post_max_size = 100M

and your file is 99.99MB it may fail because of that.

Give post_max_size 5% more room to be on the sure side.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜