Uncategorized
[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!
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