[How To] Disable Suhosin for a domain

If you are getting following error related to suhosin

/usr/bin/php: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so: undefined symbol: zend_atol
[Sun Jan 30 11:07:08 2011] [error] [client] Premature end of script headers: /home/username/public_html/wp-admin/index.php

It means that Suhosin should be disabled for the particular domain. We are going to see how this can be achieved using php.ini. Please note that .htaccess does not support the PHP values if suPHP is enabled on the server. Hence, we are using php.ini to achieve the goal.

Steps to disable Suhosin

1) Check the loaded global PHP configuration file php.ini

php -i | grep php.ini

Output:

Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

2) Copy the file into the account of the domain in the problem

cp /usr/local/lib/php.ini /home/username/public_html
cd /home/username/public_html

3) Edit the copied php.ini using any editor

vi php.ini

4) Search for the following string

extension="suhosin.so"

5) Comment the line

;extension="suhosin.so"

6) Add the following line at the end of the file

suhosin.simulation=On

or

suhosin.simulation On

7) Restart apache service

 If any feedback, queries are always welcome!

Share on Facebook0
Share on Google+2Tweet about this on TwitterShare on StumbleUpon1Share on LinkedIn0Share on Tumblr0Digg thisPin on Pinterest0Share on Reddit0Email this to someonePrint this page
If you are getting following error related to suhosin /usr/bin/php: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so: undefined symbol: zend_atol [Sun Jan 30 11:07:08 2011] [error] [client] Premature end of script headers: /home/username/public_html/wp-admin/index.php It means that Suhosin should be disabled for the particular domain. We are going to see how this can be achieved using php.ini. Please note that .htaccess does not support the PHP values if suPHP is enabled on the server. Hence, we are using php.ini to achieve the goal. Steps to disable Suhosin 1) Check the loaded global PHP configuration file php.ini php -i | grep php.ini Output: Configuration File…

Review Overview

User Rating: Be the first one !

About Abhijit Sandhan

Abhijit Sandhan
Loves Linux, Blogging, Traveling, Hiking and sharing knowledge!

One comment

  1. If you can't find suhosin on php.ini, there should be a separate config file for suhosin (/etc/php5/conf.d/suhosin.ini). Go there and comment extension like below
    ;extension="suhosin.so"
    Restart apache

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA