View previous topic :: View next topic |
Author |
Message |
fishsauce n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 25 Oct 2007 Posts: 4
|
Posted: Sun Nov 18, 2007 1:10 am Post subject: Suhosin not loading in PHP5 CGI |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
steveb Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1198140199438f3db8ee800.gif)
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Sun Nov 18, 2007 9:09 pm Post subject: |
|
|
Have you executed "etc-update" after emerging php5?
// SteveB |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fishsauce n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 25 Oct 2007 Posts: 4
|
Posted: Mon Nov 19, 2007 4:16 am Post subject: |
|
|
Yes, I have and there is nothing else to update. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ScOut3R Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Apr 2005 Posts: 116 Location: Australia
|
Posted: Fri Dec 07, 2007 7:49 am Post subject: |
|
|
I have similar problems. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hoffie Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
Joined: 30 Nov 2006 Posts: 24
|
Posted: Sun Dec 09, 2007 11:09 am Post subject: Re: Suhosin not loading in PHP5 CGI |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
ScOut3R Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Apr 2005 Posts: 116 Location: Australia
|
Posted: Sun Dec 09, 2007 11:16 am Post subject: Re: Suhosin not loading in PHP5 CGI |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
hoffie Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
Joined: 30 Nov 2006 Posts: 24
|
Posted: Sun Dec 09, 2007 11:24 am Post subject: Re: Suhosin not loading in PHP5 CGI |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
ScOut3R Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Apr 2005 Posts: 116 Location: Australia
|
Posted: Sun Dec 09, 2007 12:28 pm Post subject: |
|
|
Thank You!
Re-emerging suhosin solve it! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Berty n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 27 Aug 2007 Posts: 20
|
Posted: Sun Mar 09, 2008 9:58 pm Post subject: |
|
|
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.
![Sad :(](images/smiles/icon_sad.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|