View Full Version : suhosin question

09-06-2007, 02:43 PM

I'm not sure if this is the right forum area for this, so if not I'm sorry.

I've used the custombuild script to install PHP 5 as CGI and suPHP and now wanted to try and install the suhosin extension.

It compiles ok without any problems and copies itself into the extensions/{subdir with numbers} so I have copied it directly into the extensions directory.

But after I enable the extension in php.ini and adjusting the php extension directory to where suhosin.so is located it still doesnt load.

I've ran php -v from ssh and this is the output:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/suhosin.so' - /usr/local/lib/php/extensions/suhosin.so: undefined symbol: zend_open in Unknown on line 0
PHP 5.2.3 (cli) (built: Aug 26 2007 16:39:28)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

I've looked on the suhosin's forums but I can't find any working answer.

Has anyone got any suggestions please?

Thanks in advanced for any help and tips.

09-06-2007, 09:00 PM
Are you on a FreeBSD box? The suhosin version only patches the existing php code as i can tell and only occures if you recompiled php from ports. You should rebuild your custom installation of php to remove this extension and not install php from ports but rather from the DA build.

09-07-2007, 03:28 AM
Thx for the reply.

This is a fresh build using the custombuild script from smtalk.

I didnt install the patch, only the extension.

Oh, and its a Centos 4.5 box.

09-07-2007, 03:44 AM

09-07-2007, 09:21 AM
You must also remember your using the CGI version of php, so when you login to your server and type php -v it pulls the CLI info, try: /usr/local/php5/bin/php -v

09-07-2007, 10:27 AM
Thx but thats what I did and thats the error I got about suhosin.

09-07-2007, 01:45 PM
Ok. Another update on this.

I've recompiled PHP with the "--with-php-config" and I'm still getting the same error.

09-07-2007, 02:39 PM
Another note on this.

It works with PHP4, but not PHP5. Either CGI or CLI. Both of them dont like suhosin on PHP5.2.4.

Anyone got any ideas please?

09-08-2007, 03:41 PM
Do you see that?

Ohhh I just see that you are using --enable-versioning in your configure line.

That option is incompatible to nearly all shared extensions.

01-13-2008, 06:16 AM
Just to update this thread..

The problem was solved by using this command

./configure --with-php-config=/usr/local/php5/bin/php-config