Monday, January 4, 2016

HOWTO Disable suhosin on a Server using php.ini or .htaccess

Disable suhosin Using php.ini file


- Login to the server and backup the php.ini file to your home directoey.
root@ximunix:~# cp /etc/php5/apache2/php.ini /home/<username>/php.ini_back_20160104

- Open the php.ini file and add the following code to the file:
[suhosin]
; Misc Options
suhosin.simulation = On

Where:
On = Disabled
Off  = Enabled

- Save and exit the file, reload apache2 service

Disable suhosin Using .htaccess file

- Locate and open the .htaccess file of the domain in question.
- Add the following lines in the file:
php_flag suhosin.simulation On

NOTE:
If suphp is in activated on the server, you may also need to add this to your .htaccess.
<Files ".ht*">
deny from all
</Files>
suPHP_ConfigPath /home/username

- Save and exit the file, reload apache2 service