[PEAR-BUG] Doc #18655 [Bgs]: pecl install doesn't recognize shared extensions

[email protected]
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at http://pear.php.net/bugs/bug.php?id=18655&edit=1

 ID:               18655
 Updated by:       [email protected]
 Reported By:      mfonda at php dot net
 Summary:          pecl install doesn't recognize shared extensions
 Status:           Bogus
 Type:             Documentation Problem
 Package:          PEAR
 Operating System: Ubuntu 10.04.1 LTS
 Package Version:  1.9.3
 PHP Version:      5.3.6
 Roadmap Versions: 
 New Comment:

I wonder if there are other ways to deal with this. -n is important but
in theory we 
could attempt to also read the ini to figure out what can be enabled etc


Previous Comments:
------------------------------------------------------------------------

[2011-07-07 00:47:44] mfonda

-Status: Open
+Status: Bogus
-Type:   Bug
+Type:   Documentation Problem
I guess there's not much to do other than update docs to indicate this.
Perhaps the error message could be updated to 
indicate that it could be successfully installed using --force or pear
install if the you have the missing extension shared.

------------------------------------------------------------------------

[2011-07-07 00:35:16] dufuz

See the response from Greg on #7582 - That is the reason we use -n

------------------------------------------------------------------------

[2011-07-06 23:01:11] mfonda

Description:
------------
When a PECL package has a PHP extension as a dependency, the installer
may only 
detect the extension if it was compiled statically into PHP.

This is related to PECL bug #17012 -
http://pecl.php.net/bugs/bug.php?id=17012 (solr 
failing because of this)

I've tracked down the reason this is happening: the `pecl` command
passes the -n 
option to php (ignore all ini files), and thus the shared extensions
never get loaded, so 
the installer thinks they are missing.

Not sure what the best solution here is, maybe just remove the -n? It
doesn't look like 
the pear command includes it, just pecl.

It looks like this bug report is more or less a duplicate of 
http://pear.php.net/bugs/bug.php?id=7582 - opening this up again as I
think it is worth 
revisiting. If the resolution is still to do nothing, change this to a
documentation issue 
and I'll make a note of this in the docs. I think it is worth doing
something as it's common 
for php to be installed with apt-get these days, so lots of people will
have shared 
extensions.

Test script:
---------------
$ php -m | grep curl                                                    
                                                                        
                                                                        
                      
curl

pecl install solr                                                       
                                                                        
                                                                        
                                  
pecl/solr requires PHP extension "curl"                                 
                                                                        
                                                                        
                                                    
No valid packages found                                                 
                                                                        
                                                                        
                                                    
install failed

Expected result:
----------------
extension installs

Actual result:
--------------
extension fails to install

------------------------------------------------------------------------


-- 
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18655&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.