Saturday, 21 May 2011

Improve PHP Security – Part 0. Prerequisites

PHP is one of the most unsecure things you will have on your server.
You should at least try to protect yourself and make it a little more secure.

Before we begin to improve PHP’s security we need to install gcc and make (in order to install Suhosin) and add some more PHP libraries to make it at least useful.

After this short prelude we will install Suhosin, restrict open_basedir (and some might say some prayers too).

Install gcc and make (if you don’t have them already)
yum install gcc-c++
yum install make

Add some more PHP libraries
yum install php53-gd php53-imap php53-ldap php53-mysql php53-odbc php53-pear php53-xml php53-xmlrpc
/etc/init.d/httpd restart

Now let’s add Suhosin to PHP!

No comments:

Post a Comment