Here are some of the things:
- Disable functions like
eval , passthru , shell_exec , etc. - Remote url input, disable
allow_url_fopen - Disable
register_globals
And do not forget:
- You are also responsible. Write a secure code, read the security tutorials there.
PHP Security Guide
Finally, as suggested by Rook, you should run:
PHPSecInfo script to see the security settings of your host.
http://phpsec.org/projects/phpsecinfo/
For web hosts and development teams
In development environments, make sure you have the appropriate coding standards. If you think you have unsafe code that you did not write, consider installing a web application firewall. Also consider steps to prevent attacks using bruteforce (for example, if you use the popular CMS tools), an intrusion prevention system such as Fail2Ban can help you with this. There are many of these issues in this conversation. Practical web security - Junade Ali , the video of the conversation is here .
For PHP, you can also use Suhosin , which adds a number of security features to the PHP core. Be careful, install it first and check your sites to make sure it doesn't break anything.
source share