PHP Warning: Suhosin Extension does not officially support PHP 5.2.

May 3, 2013 / Web Hosting

PHP Warning:  PHP Startup: Suhosin Extension does not officially support PHP 5.2 and below anymore, because it is discontinued. Use it at your own risk. in Unknown on line 0

Often when your cloud solutions provider upgrades the PHP version on the server you will notice this type of error in your “error logs” file. It is one of the errors that usually occur on WordPress-based sites, however, it doesn’t relate to the WordPress files.

There are several scripts that don’t support the upgraded version of PHP. In this case, the error shows that the “Suhosin Extension does not support PHP 5.2 version”. Now, what to do? You don’t need to worry. You have come to the right place for the solution. Simply follow the steps given below to fix this error.

How to fix the “Suhosin Extension does not support“ error?

The above error fixed either by downgrading the Suhosin version or by disabling the suhosin function in php.ini file. Here, in this blog post, we are disabling the suhosin function to fix the above error. The following steps are applicable only to those users who have root access to the server or full access to the php.ini file. If you are on a shared server, you can request your web hosting provider to fix this issue for your domain.

How to Disable the Suhosin Function for a particular domain via SSH?

  1. Log in to your server via SSH.
  2. Enter the following command.
    # php -i | grep php.ini

    It will output the following:

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

  3. Copy the file under the domain account, where you are getting this error.
    # cp /usr/local/lib/php.ini /home/username/public_html# cd /home/username/public_html
  4. Edit the php.ini file using the editor of your choice. Here, we are using the “vi editor”.
    # vi php.ini
  5. Now, search for the following.
    extension=”suhosin.so”
  6. Comment the line like this:
    ;extension=”suhosin.so”
  7. Save the file and exit by firing the following command.
    :wq
  8. Now simply restart the Apache service.

That’s it! You’re done.