The Problem
Chances are you have seen the following error message (or else you would probably not have found this post):
Error: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/suhosin.so' - /usr/lib/php5/20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown, line 0
I hope I am not the only one who lived with this message for a while, because everything was working as expected. But even though I never noticed any real problem, the message surely gets on your nerve after a while, so it’s time to make it go away…
The Solution
The solution is actually very easy. As mentioned on the Debian Bug Tracking System ages ago, all you need to do is to purge the suhosin package (the php5-suhosin package, to be precise):
sudo aptitude purge php5-suhosin
(In case you have not enabled sudo, just do the usual and run this command as superuser without the sudo.)
helpful…thank you. having a few issues with php after upgrading to wheezy. that’s one sorted…
Thank you, so much! You’ve just saved me some headaches. Have an awesome day!
Thanks! Those annoying messages have now gone away for me. Very useful little post.
[...] indicated here and in the Debian Bug Tracking system , you only have to purge the related package php5-suhosin as [...]
thanks
thanks!
Thanks worked perfectly.
You shouldnt recomended to disable php suhosin with is a security module for php aplications and websites.
It was the only solution I could find at the time. This problem probably happens to most people when they are updating their system. Debian Wheezy does not seem to ship with suhosin anymore, which is why I got the error after upgrading from squeeze to wheezy. And I would argue that for most people this fix is good enough. Anybody who wants to add it manually is welcome to do so and I will happily link to a good blog post which explains how to do this. But I can’t write a blog post about myself, because I don’t intend to do install it.
Worked! Thanks
The functionality of Suhosin was merged into core PHP, hence it is not ‘needed’ anymore and was removed. I doubt that it will be restored.
Purging the package doesn’t seem to remove the following configuration file that causes Apache to keep trying to load suhosin (causing an error message in Apache’s error log).
/etc/php5/conf.d/suhosin.ini
Removing this file made the error message go away.
Thank you very much!
Thank you very much for this. Cured my headache!
Thanks worked perfectly.