vimeo / vimeo.php

Official PHP library for the Vimeo API.
https://developer.vimeo.com
Apache License 2.0
450 stars 210 forks source link

Uncaught exception 'Vimeo\Exceptions\VimeoRequestException' with message 'Unable to complete request.[SSL connect error]' #199

Open iambasitali opened 5 years ago

iambasitali commented 5 years ago

I implement the Vimeo API at localhost and it was working fine but when I upload the code at cpanel some SSL Connection errror occurs.

Fatal error: Uncaught exception 'Vimeo\Exceptions\VimeoRequestException' with message 'Unable to complete request.[SSL connect error]' in /var/www/vhosts/musicpax.com/httpdocs/launch_search/vimeo/vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php:449 Stack trace: #0 /var/www/vhosts/musicpax.com/httpdocs/launch_search/vimeo/vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php(133): Vimeo\Vimeo->_request('https://api.vim...', Array) #1 /var/www/vhosts/musicpax.com/httpdocs/launch_search/vimeo/index.php(51): Vimeo\Vimeo->request('/videos?query=t...', Array, 'GET') #2 /var/www/vhosts/musicpax.com/httpdocs/launch_search/vimeo/index.php(40): SearchVimeoVidoes('taki+taki') #3 {main} thrown in /var/www/vhosts/musicpax.com/httpdocs/launch_search/vimeo/vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php on line 449

Please have a look on it and let me know how to fix that issue. Thank You.

tommypenner commented 5 years ago

What version of TLS is configured on your end? Vimeo only accepts TLS 1.2 and newer connections, in compliance with internet-wide security mandates.

iambasitali commented 5 years ago

Hi @tommypenner I am using TLS 1.1 as shown in the below screenshot https://www.screencast.com/t/hrArLQK6sq1

tommypenner commented 5 years ago

Check your configuration and verify that you're connecting to Vimeo using a TLS 1.2 connection, that should resolve the SSL error.

iambasitali commented 5 years ago

Hi @tommypenner I did not found configuration How to connect Vimeo with TLS 1.2? I am totally stuck here to find out the solution.

iambasitali commented 5 years ago

@tommypenner I checked again that we are using TLS 1.2. is there somthing else issue?? Is there need to any command from command prompt.

czmole commented 5 years ago

Probabbly not the wisest safest way but on older PHP version 5.6 we need to stick for the moment, to force the TLS 1.2 usage you can use an option for curl _CURLOPTSSLVERSION => 6

A small script to check for your version of TLS when attempting to use 1.2 https://gist.github.com/czmole/67f43af15d14c2d604cde5e178c57d3f

czmole commented 5 years ago

Details of CURLOP_SSLVERSION can be checked here https://curl.haxx.se/libcurl/c/CURLOPT_SSLVERSION.html

eddster37 commented 5 years ago

@iambasitali my company had the same issue, and ours had to do with the firewall.