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

Bug #16 https doesn't work when using a proxy
Submitted: 2003-09-17 08:42 UTC
From: david at djin dot com Assigned:
Status: Wont fix Package: HTTP_Request
PHP Version: 4.3.2 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2003-09-17 08:42 UTC] david at djin dot com
Description: ------------ I'm trying to connect to a host over HTTPS using a proxy. This doesn't work, it: 1) Does nothing. 2) Gives an error When connecting to the host over HTTPS without using a proxy, everything works fine. Reproduce code: --------------- $params = array( "proxy_host" => $host, "proxy_port" => $port ); $a = &new HTTP_Request( "https://" . $url, $params ); $a -> sendRequest( ); echo $a -> getResponseBody( ); Expected result: ---------------- Ouput the HTML code I requested from the host Actual result: -------------- Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in /usr/lib/php/Net/Socket.php on line 109 Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: SSL handshake/connection failed in /usr/lib/php/Net/Socket.php on line 109 Warning: fsockopen(): failed to activate SSL mode 1 in /usr/lib/php/Net/Socket.php on line 109

Comments

 [2003-10-26 10:33 UTC] avb
I think it is not possible to work with HTTPS proxies via PHP's fsockopen() wrapper. Try using CURL instead. Current CVS version of HTTP_Request will raise a PEAR error if such an attempt is made.