danieledangeli / betfair-php

Betfair php library
http://danieledangeli.github.io/betfair-php
47 stars 30 forks source link

SSL certificate problem #10

Closed apuestaya closed 9 years ago

apuestaya commented 9 years ago

Hello and tahnk you for this project.

I installed project with composer with follow composer.json { "name": "Alex", "description": "My app", "require": { "php": ">=5.4", "erlangb/betfair": "0.2.*", "symfony/yaml": "~2.6", "symfony/finder": "~2.6" }, "autoload": { "psr-0" : { "betfair" : "src" } } }

Now, i'm reciving this issue. I tried to install original json file but i still gets operator += issue This is issue i'm geting. Thank you

Fatal error: Uncaught exception 'GuzzleHttp\Ring\Exception\RingException' with message 'cURL error 60: SSL certificate problem: unable to get local issuer certificate' in C:\xampp\htdocs\betfair\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php:126 Stack trace: #0 C:\xampp\htdocs\betfair\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php(90): GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Object(GuzzleHttp\Ring\Client\CurlHandler), Array, Array) #1 C:\xampp\htdocs\betfair\vendor\guzzlehttp\ringphp\src\Client\CurlHandler.php(78): GuzzleHttp\Ring\Client\CurlFactory::createResponse(Object(GuzzleHttp\Ring\Client\CurlHandler), Array, Array, Array, Resource id #152) #2 C:\xampp\htdocs\betfair\vendor\guzzlehttp\ringphp\src\Client\Middleware.php(54): GuzzleHttp\Ring\Client\CurlHandler->__invoke(Array) #3 C:\xampp\htdocs\betfair\vendor\guzzlehttp\ringphp\src\Client\Middleware.php(30): GuzzleHttp\Ring\Client\Middleware::GuzzleHttp\Ring\Client{closure}(Array) #4 C:\xampp\htdocs\betfair\vendor\guzzlehttp\guzzle\src\Req in C:\xampp\htdocs\betfair\vendor\guzzlehttp\command\src\AbstractClient.php on line 171

apuestaya commented 9 years ago

I installed SSL for localhost but still get fatal error with guzzle. How much can you install it in my localhost to see results. Thank you very much

danieledangeli commented 9 years ago

It seems a problem with your certificate in your machine. I never had this problem. Try to have a look here: http://stackoverflow.com/questions/24611640/curl-60-ssl-certificate-unable-to-get-local-issuer-certificate and follow the thread on the last response (the one with 8 upvotes). Unfortunately I tried to replicate the issue but I didn't have any problem

apuestaya commented 9 years ago

Thank you i got it fixed. Now i'm playing with you great API.

pedroloureiro82 commented 9 years ago

If you use XAMPP on Windows and if you have this problem do this steps. It worked for me:

  1. download http://curl.haxx.se/ca/cacert.pem and save it somewhere.
  2. update php.ini -- add curl.cainfo = "PATH_TO/cacert.pem"
  3. restart apache

instructions from http://stackoverflow.com/a/16495053/4096270

modasser commented 8 years ago

Thanks a lot