Installing =dev-php/pecl-http-2.6.0 within a PHP 5.6 environment and using one of its provided methods, results in the following error message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php5.6/lib/extensions/no-debug-non-zts-20131226/http.so' - /usr/lib64/php5.6/lib/extensions/no-debug-non-zts-20131226/http.so: undefined symbol: php_resource_factory_handle_ctor in Unknown on line 0 The problem seems to be the wrong start-up order of the pecl-http extension and its dependencies (propro and raphf). Steps to reproduce: # Install dev-php/pecl-http emerge -va =dev-php/pecl-http-2.6.0 # Call one of its methods php -r 'var_dump(new http\Client);' # The following error message appears PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php5.6/lib/extensions/no-debug-non-zts-20131226/http.so' - /usr/lib64/php5.6/lib/extensions/no-debug-non-zts-20131226/http.so: undefined symbol: php_resource_factory_handle_ctor in Unknown on line 0 PHP Fatal error: Class 'http\Client' not found in Command line code on line 1 Workaround: # Make sure the pecl-http extension will be loaded after the propro and raphf extensions cd /etc/php/cli-php5.6/ext-active mv http.ini zzz-http.ini # The same workaround can be applied if using PHP with /etc/php/apache2-php5.6/ext-active # Test it again php -r 'var_dump(new http\Client);' object(http\Client)#1 (4) { ["observers":"http\Client":private]=> object(SplObjectStorage)#2 (1) { ["storage":"SplObjectStorage":private]=> array(0) { } } ["options":protected]=> NULL ["history":protected]=> NULL ["recordHistory"]=> bool(false) } See also: * https://mdref.m6w6.name/http#PHP.extensions: * http://stackoverflow.com/questions/21077976/pecl-http-failed-to-load/23356662#23356662
I hacked together a fix for this using your suggestion. After pecl-http is installed, I rename the symlinks to "zzhttp.ini". It would be better to have a real fix in the eclass, so I've made a note over on bug 586446, but the hack should work for now. Thanks!