메뉴 건너뛰기

zend picasa ssl conection error

Average Rating:
 0명 참여
Rate this page:
평점 한줄평 글쓴이 작성날짜

오랜지 코드를 추가하여 3번더 구글에 연결을 시도하도록 수정하였습니다.


Zend/Http/Client/Adapter/Socket.php (185번째 줄)


    /**
     * Connect to the remote server
     *
     * @param string  $host
     * @param int     $port
     * @param boolean $secure
     */
    public function connect($host, $port = 80, $secure = false)
    {
        // If the URI should be accessed via SSL, prepend the Hostname with ssl://
        $host = ($secure ? $this->config['ssltransport'] : 'tcp') . '://' . $host;

        // If we are connected to the wrong host, disconnect first
        if (($this->connected_to[0] != $host || $this->connected_to[1] != $port)) {
            if (is_resource($this->socket)) $this->close();
        }

        // Now, if we are not connected, connect
        if (! is_resource($this->socket) || ! $this->config['keepalive']) {
            $context = $this->getStreamContext();
            if ($secure || $this->config['sslusecontext']) {
                if ($this->config['sslcert'] !== null) {
                    if (! stream_context_set_option($context, 'ssl', 'local_cert',
                                                    $this->config['sslcert'])) {
                        require_once 'Zend/Http/Client/Adapter/Exception.php';
                        throw new Zend_Http_Client_Adapter_Exception('Unable to set sslcert option');
                    }
                }
                if ($this->config['sslpassphrase'] !== null) {
                    if (! stream_context_set_option($context, 'ssl', 'passphrase',
                                                    $this->config['sslpassphrase'])) {
                        require_once 'Zend/Http/Client/Adapter/Exception.php';
                        throw new Zend_Http_Client_Adapter_Exception('Unable to set sslpassphrase option');
                    }
                }
            }

            $flags = STREAM_CLIENT_CONNECT;
            if ($this->config['persistent']) $flags |= STREAM_CLIENT_PERSISTENT;

            $this->socket = @stream_socket_client($host . ':' . $port,
                                                  $errno,
                                                  $errstr,
                                                  (int) $this->config['timeout'],
                                                  $flags,
                                                  $context);
            if (! $this->socket) {
                $i = 0;
                $this->socket = @stream_socket_client($host . ':' . $port,
                           $errno,
                           $errstr,
                           (int) $this->config['timeout'],
                           $flags,
                           $context);
               }
            if (! $this->socket) {
                $i = 1;
                $this->socket = @stream_socket_client($host . ':' . $port,
                           $errno,
                           $errstr,
                           (int) $this->config['timeout'],
                           $flags,
                           $context);
               }
            if (! $this->socket) {
                $i = 2;
                $this->socket = @stream_socket_client($host . ':' . $port,
                           $errno,
                           $errstr,
                           (int) $this->config['timeout'],
                           $flags,
                           $context);
               }

            if (! $this->socket) {
                $this->close();
                require_once 'Zend/Http/Client/Adapter/Exception.php';
                throw new Zend_Http_Client_Adapter_Exception(
                    $i.'times soket.php Unable to Connect to ' . $host . ':' . $port . '. Error #' . $errno . ': ' . $errstr);
            }

            // Set the stream timeout
            if (! stream_set_timeout($this->socket, (int) $this->config['timeout'])) {
                require_once 'Zend/Http/Client/Adapter/Exception.php';
                throw new Zend_Http_Client_Adapter_Exception('Unable to set the connection timeout');
            }

            // Update connected_to
            $this->connected_to = array($host, $port);
        }
    }



error.PNG zend_error01.PNG


제목 날짜
Star Rating 별점 위젯 업데이트 정보   2014.03.09
xe 사용자정의 정렬 활용법   file
    9
xe Thumbnail wizard 모듈 참고 자료  
zend picasa ssl conection error   file
masonry 예제  
태그 목록