PEAR error trying to connect to gandi using test code

From: Date: Thu, 09 Apr 2015 06:31:38 +0000
Subject: PEAR error trying to connect to gandi using test code
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-32012@lists.php.net to get a copy of this message
My first connection attempt to the gandi api and my script blows up with a mis guided PEAR issue: # php ganditest.php PHP Warning: require_once(XML/RPC2/Exception.php): failed to open stream: No such file or directory in /usr/local/share/pear/XML/RPC2/Client.php on line 43 Warning: require_once(XML/RPC2/Exception.php): failed to open stream: No such file or directory in /usr/local/share/pear/XML/RPC2/Client.php on line 43 PHP Fatal error: require_once(): Failed opening required 'XML/RPC2/Exception.php' (include_path='.:/usr/local/bin/') in /usr/local/share/pear/XML/RPC2/Client.php on line 43 Fatal error: require_once(): Failed opening required 'XML/RPC2/Exception.php' (include_path='.:/usr/local/bin/') in /usr/local/share/pear/XML/RPC2/Client.php on line 43 I try to set it to the PEAR dir: # pear config-set bin_dir /usr/local/share/pear config-set succeeded and # php ganditest.php PHP Warning: require_once(XML/RPC2/Exception.php): failed to open stream: No such file or directory in /usr/local/share/pear/XML/RPC2/Client.php on line 43 Warning: require_once(XML/RPC2/Exception.php): failed to open stream: No such file or directory in /usr/local/share/pear/XML/RPC2/Client.php on line 43 PHP Fatal error: require_once(): Failed opening required 'XML/RPC2/Exception.php' (include_path='.:/usr/local/bin/') in /usr/local/share/pear/XML/RPC2/Client.php on line 43 Fatal error: require_once(): Failed opening required 'XML/RPC2/Exception.php' (include_path='.:/usr/local/bin/') in /usr/local/share/pear/XML/RPC2/Client.php on line 43 # cat ganditest.php <?php require_once '/usr/local/share/pear/XML/RPC2/Client.php'; $version_api = XML_RPC2_Client::create( 'https://rpc.gandi.net/xmlrpc/', array( 'prefix' => 'version.', 'sslverify' => True ) ); $apikey = 'mykey'; $result = $version_api->info($apikey); print_r($result); ?> How do I tell PhP to look for PEAR in the correct folder so I can connect to Gandi?

« previous php.pear.general (#32012) next »