How to set post_max_size on apache server with htaccess (getting internal server error)

后端 未结 1 861
忘掉有多难
忘掉有多难 2020-12-10 17:26

I am trying to increase the maximum post size limit on my server.

Here is the .htaccess file:

php_value upload_max_filesize 20M
php_value post_max_si         


        
相关标签:
1条回答
  • 2020-12-10 17:42

    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.

    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.

    0 讨论(0)
提交回复
热议问题