I recently modified my dev environment to allow PHP 5.4 apps, something that involved adding a bunch of Debian Linux “wheezy” sources to my aptitude configuration. No problem in itself, but it did totally wreck my web server’s ability to load the suhosin.so extension (PHP 5.4 doesn’t support it).
This wasn’t a biggie until I hit up one of my Laravel apps and was greeted with a lovely message that said the following: [code lang=”bash”] Unhandled Exception Message: 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 Location: Unknown on line 0 [/code]
Not nice. Looking through php.ini, apache2.conf and httpd.conf showed nothing and, since I’m not particularly familiar with suhosin in itself, I couldn’t figure out where the extension was being loaded. [code lang=”bash”] locate suhosin [/code]
That showed me that there is a file on my system called suhosin.ini located in /etc/php5/conf.d so I fired up nano (I’m not cool enough to use vi) and, sure enough, there at the top was the following line: [code lang=”bash”] extension=suhosin.so [/code]
I commented that line, restarted the apache services: [code lang=”bash”] service apache2 restart [/code]
… and now Laravel doesn’t throw any horrible unhandled exceptions about suhosin being broken.