문제

Trouble with authentication in vk.com with zend_oauth

Message: Error in HTTP request: Unable to enable crypto on TCP connection oauth.vk.com: make sure the "sslcafile" or "sslcapath" option are properly set for the environment.

Help me please

도움이 되었습니까?

해결책

You need to use curl as adapter and turn off ssl certificate checks:

$adapter = new \Zend\Http\Client\Adapter\Curl();
$adapter = $adapter->setCurlOption(CURLOPT_SSL_VERIFYHOST, false);
$adapter = $adapter->setCurlOption(CURLOPT_SSL_VERIFYPEER, false);

$config = array(
    'siteUrl'        => 'https://url',
    'consumerKey'    => 'login',
    'consumerSecret' => 'pass'
);
$consumer = new \ZendOAuth\Consumer($config);

/** @var \Zend\Http\Client $httpClient */
$httpClient = $consumer->getHttpClient();
$httpClient->setAdapter($adapter);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top