如何设置的post_max_size的Apache服务器上htaccess的(获得内部服务器错误) [英] How to set post_max_size on apache server with htaccess (getting internal server error)
问题描述
我想我的服务器上增加最大后大小限制。
I am trying to increase the maximum post size limit on my server.
下面是.htaccess文件:
Here is the .htaccess file:
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200
然而,它似乎并没有工作,并抛出一个500内部服务器错误。
However it does not seem to work and throws a 500 Internal server error.
任何想法,为什么这可能会发生,以及如何克服呢?
Any ideas why this could be happening and how to overcome this?
推荐答案
据我所知,你的语法是正确的。但是, php_value
的Apache是由 mod_php的
模块提供。如果你不运行PHP作为Apache模块(例如,它运行作为FastCGI的或与其他一些SAPI),该指令将无法被定义,因此500错误。
As far as I can tell, your syntax is correct. However, the php_value
Apache directive is provided by the mod_php
module. If you don't run PHP as Apache module (e.g., it runs as FastCGI or with some other SAPI) that directive won't be defined, thus the 500 error.
有很多种方法可以更改PHP设置。在实践中,我发现,运行CGI托管服务通常提供一个自定义的的php.ini
在你的FTP帐户某处文件。此外,如果您运行PHP / 5.3.0或更高版本,您可以使用 .user.ini
文件。最后但并非最不重要的,有 ini_set()
$ C之内$ C。
There're many ways to change PHP settings. In practice, I've found that hosting services that run CGI often provide a custom php.ini
file somewhere in your FTP account. Additionally, if you run PHP/5.3.0 or newer you can use .user.ini
files. Last but not least, there's ini_set()
within code.
这篇关于如何设置的post_max_size的Apache服务器上htaccess的(获得内部服务器错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!