PDA

View Full Version : suhosin question



PhilipL
09-06-2007, 02:43 PM
Hi,

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.

pucky
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.

PhilipL
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.

smtalk
09-07-2007, 03:44 AM
http://forum.hardened-php.net/viewtopic.php?pid=675
http://forum.hardened-php.net/viewtopic.php?pid=770

iceuk626
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

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

PhilipL
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.

PhilipL
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?

DLag
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.

iceuk626
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