Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Suhosin not loading in PHP5 CGI
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
fishsauce
n00b
n00b


Joined: 25 Oct 2007
Posts: 4

PostPosted: Sun Nov 18, 2007 1:10 am    Post subject: Suhosin not loading in PHP5 CGI Reply with quote

Hi,

I'm getting this message in my apache error logs:
[Sat Nov 17 16:01:49 2007] [error] [client 192.168.1.5] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so' - /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0, referer: https://192.168.1.10:8920/index.php


It looks like suhosin is actually in the no-debug-zts-20060613 folder. I tried moving it to the non-zts folder but I got this instead:
[Sat Nov 17 16:36:44 2007] [error] [client 192.168.1.5] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so' - /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so: undefined symbol: core_globals_id in Unknown on line 0, referer: https://192.168.1.10:8920/

PHP5 was compiled as CGI without apache2 support and with the suhosin USE flag. phpinfo() does say:
This server is protected with the Suhosin Patch 0.9.6.2
Copyright (c) 2006 Hardened-PHP Project
even with that message in the apache error log. It doesn't look like the extension is loaded as there's no block for it in the bottom though (which is expected since it failed).

Any ideas on how to fix this? Thanks in advance.
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Sun Nov 18, 2007 9:09 pm    Post subject: Reply with quote

Have you executed "etc-update" after emerging php5?

// SteveB
Back to top
View user's profile Send private message
fishsauce
n00b
n00b


Joined: 25 Oct 2007
Posts: 4

PostPosted: Mon Nov 19, 2007 4:16 am    Post subject: Reply with quote

Yes, I have and there is nothing else to update.
Back to top
View user's profile Send private message
ScOut3R
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2005
Posts: 116
Location: Australia

PostPosted: Fri Dec 07, 2007 7:49 am    Post subject: Reply with quote

I have similar problems.
Back to top
View user's profile Send private message
hoffie
Retired Dev
Retired Dev


Joined: 30 Nov 2006
Posts: 24

PostPosted: Sun Dec 09, 2007 11:09 am    Post subject: Re: Suhosin not loading in PHP5 CGI Reply with quote

Simply re-merge suhosin. You have switched from USE="threads" to USE="-threads" (or the other way round) which makes all existing extensions incompatible (and changes the extension directory as well). The same happens when switching between USE="-debug" / USE="debug", btw.
Back to top
View user's profile Send private message
ScOut3R
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2005
Posts: 116
Location: Australia

PostPosted: Sun Dec 09, 2007 11:16 am    Post subject: Re: Suhosin not loading in PHP5 CGI Reply with quote

hoffie wrote:
Simply re-merge suhosin. You have switched from USE="threads" to USE="-threads" (or the other way round) which makes all existing extensions incompatible (and changes the extension directory as well). The same happens when switching between USE="-debug" / USE="debug", btw.


I've switched from mod_php to php_cgi. The re-emerge would solve the problem?
Back to top
View user's profile Send private message
hoffie
Retired Dev
Retired Dev


Joined: 30 Nov 2006
Posts: 24

PostPosted: Sun Dec 09, 2007 11:24 am    Post subject: Re: Suhosin not loading in PHP5 CGI Reply with quote

ScOut3R wrote:

I've switched from mod_php to php_cgi.

I don't think this would matter in any way. Whenever you are swapping USE="threads" or USE="debug" you have to rebuild all php extensions to get them working again (and run dispatch-conf or similar after, of course). Apparently you've switched from USE="threads" to USE="-threads" when switching to php-cgi (which is a good idea since thread-safe php builds seem to still have some problems and are known to be slightly slower. Thread-safety is only required when using PHP as mod_php with multi-threaded Apache workers).
So, yes, simply do emerge -av dev-php5/suhosin && dispatch-conf and suhosin should start working again.
Manually moving portage-owned files around is not a good idea, by the way.
Back to top
View user's profile Send private message
ScOut3R
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2005
Posts: 116
Location: Australia

PostPosted: Sun Dec 09, 2007 12:28 pm    Post subject: Reply with quote

Thank You!

Re-emerging suhosin solve it!
Back to top
View user's profile Send private message
Berty
n00b
n00b


Joined: 27 Aug 2007
Posts: 20

PostPosted: Sun Mar 09, 2008 9:58 pm    Post subject: Reply with quote

guys, the same problem! After re-emerging suhosin the following error appears:
Code:

web # /usr/bin/php test.php
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/zip.so' - /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0

I've got no idea what zip.so is.

:(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum