Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.16

Bug #4825 pear behind a proxy using REST dosnt work
Submitted: 2005-07-13 19:37 UTC
From: fsteinel Assigned: cellog
Status: Closed Package: PEAR
PHP Version: 4.3.10 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-07-13 19:37 UTC] fsteinel
Description: ------------ linux:~ # pear config-show Configuration (channel pear.php.net): ===================================== Auto-discover new Channels auto_discover <not set> Default Channel default_channel pear.php.net HTTP Proxy Server Address http_proxy http://proxy:3128/ PEAR server [DEPRECATED] master_server pear.php.net Default Channel Mirror preferred_mirror pear.php.net Remote Configuration File remote_config <not set> PEAR executables directory bin_dir /usr/bin PEAR documentation directory doc_dir /usr/share/php/doc PHP extension directory ext_dir /usr/share/extensions/no-debug-non-zts-20020429 PEAR directory php_dir /usr/share/php PEAR Installer cache directory cache_dir /tmp/pear/cache PEAR data directory data_dir /usr/share/php/data PHP CLI/CGI binary php_bin /usr/bin/php PEAR test directory test_dir /usr/share/php/test Cache TimeToLive cache_ttl 3600 Preferred Package State preferred_state beta Unix file mask umask 22 Debug Log Level verbose 1 PEAR password (for password <not set> maintainers) Signature Handling Program sig_bin /usr/local/bin/gpg Signature Key Directory sig_keydir /etc/pearkeys Signature Key Id sig_keyid <not set> Package Signature Type sig_type gpg PEAR username (for username <not set> maintainers) User Configuration File Filename /root/.pearrc System Configuration File Filename /etc/pear.conf linux:~ # pear list-channels Registered Channels: ==================== Channel Summary pear.php.net PHP Extension and Application Repository pearified.com PEAR-Compatible Extension and Application Repository pecl.php.net PHP Extension Community Library __uri Pseudo-channel for static packages linux:~ # pear list-all -c pearified All packages: ============= Package Latest Local pearified/Smarty 2.6.8 2.6.8 The PHP compiling template engine linux:~ # pear list-all -c pear File http://pear.php.net:80/rest/p/packages.xml not valid (received: HTTP/1.0 400 Bad Request ) linux:~ # pear list-all -c pecl Notice: Undefined variable: v in XML/RPC.php on line 1333 Fatal error: Call to a member function on a non-object in /usr/share/php/XML/RPC.php on line 1754 linux:~ # pear list-all -c pearified All packages: ============= Package Latest Local pearified/Smarty 2.6.8 The PHP compiling template engine linux:~ # pear channel-info pear Channel pear.php.net Information: ================================= Name and Server pear.php.net Alias pear Summary PHP Extension and Application Repository Validation Package Name PEAR_Validate Validation Package default Version Server Capabilities =================== Type Version/REST type Function Name/REST base xmlrpc 1.0 logintest xmlrpc 1.0 package.listLatestReleases xmlrpc 1.0 package.listAll xmlrpc 1.0 package.info xmlrpc 1.0 package.getDownloadURL xmlrpc 1.1 package.getDownloadURL xmlrpc 1.0 package.getDepDownloadURL xmlrpc 1.1 package.getDepDownloadURL xmlrpc 1.0 package.search xmlrpc 1.0 channel.listAll rest REST1.0 http://pear.php.net/rest/ linux:~ # pear channel-info pearified Channel pearified.com Information: ================================== Name and Server pearified.com Alias pearified Summary PEAR-Compatible Extension and Application Repository Validation Package Name PEAR_Validate Validation Package default Version Server Capabilities =================== Type Version/REST type Function Name/REST base xmlrpc 1.0 logintest xmlrpc 1.0 package.listLatestReleases xmlrpc 1.0 package.listAll xmlrpc 1.0 package.info xmlrpc 1.0 package.getDownloadURL xmlrpc 1.0 package.getDepDownloadURL xmlrpc 1.0 package.search xmlrpc 1.0 channel.listAll linux:~ # pear channel-info pecl Channel pecl.php.net Information: ================================= Name and Server pecl.php.net Alias pecl Summary PHP Extension Community Library Validation Package Name PEAR_Validator_PECL Validation Package 1.0 Version Server Capabilities =================== Type Version/REST type Function Name/REST base xmlrpc 1.0 logintest xmlrpc 1.0 package.listLatestReleases xmlrpc 1.0 package.listAll xmlrpc 1.0 package.info xmlrpc 1.0 package.getDownloadURL xmlrpc 1.0 package.getDepDownloadURL xmlrpc 1.0 package.search xmlrpc 1.0 channel.listAll Versions: PEAR-1.4.0a12 XML_RPC-1.3.2

Comments

 [2005-07-20 22:24 UTC] cellog
there are 2 bugs here. One is in XML_RPC (the pecl problem), the other is in PEAR. Could you do a little sleuthing inside PEAR/REST.php to find the source of the error in terms of connection to pear.php.net? I have no access to a proxy situation and can't see anything obviously wrong. Thank you :)
 [2005-07-22 21:11 UTC] fsteinel
PEAR/REST.php (Ver 1.9 Line 274): ... $request = "GET $path HTTP/1.1\r\n"; ... Here you are missing the proxy case: If (isset($proxy['host'])) { $request = "GET $url HTTP/1.1\r\n"; } else { $request = "GET $path HTTP/1.1\r\n"; } Couldn't you just use XML_RPC::createHeaders? (XML/RPC.php Ver 1.81 Line 879) (BTW. the Setup Squid Proxy->Proxy->Internet)
 [2005-07-24 16:03 UTC] cellog
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.