FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17881&edit=1

ID: 17881
Updated by: nigel@chapman.id.au
Reported By: nigel at chapman dot id dot au
Summary: 5.3.x lacks dl() function; XML_RPC2_Client::create
fails
-Status: Open
+Status: Bogus
Type: Bug
Package: XML_RPC2
Operating System: Kubuntu 10.04
Package Version: 1.0.5
PHP Version: 5.3.0
Roadmap Versions:
New Comment:

-Status: Open
+Status: Bogus
Marking my own ticket as bogus...

Config issue meant that the xmlrpc.so extension was not loaded by
php.ini; dl() calls would not otherwise have been made, so the XML_RPC2
is OK as it stands.

As you were...


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

[2010-09-22 02:30:33] kalessin

Description:
------------
I have Pear's XML_RPC2 installed yesterday via pear install; it clashes
with PHP 5.3.x causing pages to white-screen without any error or
exception.


PROBLEM
-------

2 pear files use the now-removed dl() function.

/usr/share/php/XML/RPC2/Backend.php:

@dl('php_xmlrpc' . PHP_SHLIB_SUFFIX) || @dl('xmlrpc' .
PHP_SHLIB_SUFFIX)

/usr/share/php/XML/RPC2/Util/HTTPRequest.php:

@dl('php_curl' . PHP_SHLIB_SUFFIX) || @dl('curl' .
PHP_SHLIB_SUFFIX)


WORKAROUND
----------

The code's last-ditch attempt to load the curl and xmlrpc extensions
dynamically can be removed without affecting other operations.

Comment out the following code in Pear:

/usr/share/php/XML/RPC2/Backend.php

107 if (
108 $backend == 'Xmlrpcext' &&
109 !function_exists('xmlrpc_server_create')
110 // &&
111 // !( // TODO Use PEAR::loadExtension once PEAR passes
PHP5 unit tests (E_STRICT compliance, namely)
112 // @dl('php_xmlrpc' . PHP_SHLIB_SUFFIX) ||
@dl('xmlrpc' . PHP_SHLIB_SUFFIX)
113 // )
114 ) {
115 throw new XML_RPC2_Exception('Unable to load xmlrpc
extension.');
116 }

/usr/share/php/XML/RPC2/Util/HTTPRequest.php

184 if (!function_exists('curl_init')
185 // &&
186 // !( // TODO Use PEAR::loadExtension once PEAR passes
PHP5 unit tests (E_STRICT compliance, namely)
187 // @dl('php_curl' . PHP_SHLIB_SUFFIX) ||
@dl('curl' . PHP_SHLIB_SUFFIX)
188 // )
189 ) {
190 throw new XML_RPC2_CurlException('cURI extension is not
present and load failed');
191 }


Test script:
---------------
// On PHP >= 5.3

$x = XML_RPC2_Client::create('with any arguments');

// code continues

echo "Still running...";

Expected result:
----------------
"Still running..."

Actual result:
--------------
Whitescreen

No error or exception shown.

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 22, '10 at 3:35a
activeSep 22, '10 at 3:35a
posts1
users1
websitepear.php.net

1 user in discussion

Nigel: 1 post

People

Translate

site design / logo © 2022 Grokbase