Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 340963 - dev-php5/pecl-memcache incorrect extensions install path
Summary: dev-php5/pecl-memcache incorrect extensions install path
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 12:08 UTC by Oleg Gawriloff
Modified: 2010-10-21 19:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info ouput (emerge.info,4.12 KB, text/plain)
2010-10-20 17:14 UTC, Oleg Gawriloff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Gawriloff 2010-10-14 12:08:07 UTC
3.0.5 puts its .so file in /usr/lib64/php5/lib/extensions/no-debug-non-zts-20060613/memcache.so, but in php.ini variable is:
; Directory in which the loadable extensions (modules) reside.
extension_dir = /usr/lib64/php5/lib/php/extensions/no-debug-non-zts-20060613
all other extensions (ffmpeg,suhosin,timezonedb and ZendOptimizer) puts its .so in correct place.

It seems that correct version is in pecl-memcache-3.0.5-r1 which is hardmasked in 
/usr/portage/profiles/package.mask by 
# Ole Markus With <olemarkus@gentoo.org> (05 Oct 2010)
# PHP and PHP-related ebuilds supporting minor version
# slotting are masked for testing

pls fix path or add relevant information regarding requered php.ini changes to ebuild.



Reproducible: Always
Comment 1 Ole Markus With (RETIRED) gentoo-dev 2010-10-14 22:47:04 UTC
Firstly, you shouldn't set the extension_dir variable. The default php.ini file has this one unset.

Secondly, we do not directly control where extensions are put. PHP handles this through phpize/php-config.

Thirdly, the difference between 3.0.5 and 3.0.5-r1 is *only* that the latter support multiple installations, so it cannot fix any path problems. It would install exensions into e.g /usr/lib64/php5.3 or /usr/lib64/php5.2 depending on the PHP_TARGETS variable.

This problem is not specific to pecl-memcache since all extension are handled identically, using the exact same install procedure. The only difference would be that they were compiled for different PHP versions. For me, both pecl-timezonedb and pecl-memcache put the extension in 
/usr/lib64/php5/lib/extensions/no-debug-non-zts-20090626

I would start with removing extension_dir from php.ini and recompile all extensions. Let me know if that helps or not.

Cheers!
Comment 2 Oleg Gawriloff 2010-10-20 17:14:22 UTC
> Firstly, you shouldn't set the extension_dir variable. The default php.ini file
>has this one unset.
Hmm, I've commented out extension_dir variable and reinstalled php. After dispatch-conf I've see that php tries to set this varibale again.

barzog@falcon-cl2 ~ $ sudo dispatch-conf
--- /etc/php/apache2-php5/php.ini       2010-10-20 19:21:09.000000000 +0300
+++ /etc/php/apache2-php5/._cfg0000_php.ini     2010-10-20 19:25:58.000000000 +0300
@@ -483,7 +488,7 @@
 user_dir =

 ; Directory in which the loadable extensions (modules) reside.
-; extension_dir = /usr/lib64/php5/lib/php/extensions/no-debug-non-zts-20060613
+extension_dir = /usr/lib64/php5/lib/extensions/no-debug-non-zts-20060613

 ; Whether or not to enable the dl() function.  The dl() function does NOT work
 ; properly in multithreaded servers, such as IIS or Zeus, and is automatically

Also I reinstall all extensions: all extensions goes to /usr/lib64/php5/lib/extensions/no-debug-non-zts-20060613/memcache.so as intended.

php-config output:
  --extension-dir     [/usr/lib64/php5/lib/extensions/no-debug-non-zts-20060613]

So, why renstalling php is sets extensions_dir?

Comment 3 Oleg Gawriloff 2010-10-20 17:14:49 UTC
Created attachment 251351 [details]
emerge --info ouput
Comment 4 Ole Markus With (RETIRED) gentoo-dev 2010-10-20 17:24:33 UTC
(In reply to comment #2)

> So, why renstalling php is sets extensions_dir?
> 

It could be that the extension_dir setting is still enabled with the default php 5.2 ini file. I only had the chance to check out the one shipped with 5.3 at the time.
Comment 5 Oleg Gawriloff 2010-10-21 08:22:01 UTC
So we have inconsistence here. In php 5.2.14 php set extension_dir in config file but not in php-config. So any suggestions (for those with initial setup of php 5.2.xx and modules)?
Comment 6 Ole Markus With (RETIRED) gentoo-dev 2010-10-21 09:13:04 UTC
(In reply to comment #5)
> So we have inconsistence here. In php 5.2.14 php set extension_dir in config
> file but not in php-config. So any suggestions (for those with initial setup of
> php 5.2.xx and modules)?
> 

Well. We already have a warning saying something like "You may have to recompile your PHP extensions now". I could also add something like "Also make sure that you merge in the correct extension_dir ini setting for all your php.ini files."
Comment 7 Oleg Gawriloff 2010-10-21 11:24:06 UTC
OK. I think this is sufficient.
Comment 8 Ole Markus With (RETIRED) gentoo-dev 2010-10-21 19:37:40 UTC
Commited. Thanks