In order to secure a PHP installation, what are the best settings for a php.ini file? What is absolutely vital in terms of security? What is recommended for most use cases?
|
I find a good step for hardening your php.ini file is to use the PHPSecInfo tool, this tool will outline what settings you have currently in your php.ini that may cause a security risk. In addition to using that tool give this article on Hardening PHP from php.ini a look its good and picks up most of the major concerns. Personally the two main things I always make sure are configured correctly are:
|
|||||||||||
|
|
Another php.ini hardening could be resources limiting, as described in configuration file itself "Resource Limits". Generally, it depends on your web-application which limits should be set up. As I know, for example, for Wordpress installation 32M memory About |
||||
|
|
|
You can use the following script to check your PHP security settings http://www.idontplaydarts.com/2011/02/hardening-and-securing-php-on-linux/ |
|||||
|