mgp25 / SC-API

Snapchat’s private API
MIT License
334 stars 106 forks source link

Uncaught exception 'CasperException' with message 'error setting certificate verify locations #223

Closed tucogit closed 9 years ago

tucogit commented 9 years ago

Hello,

I've just got this error :

Fatal error: Uncaught exception 'CasperException' with message 'error setting certificate verify locations: CAfile: ../ca_bundle.crt CApath: none' in C:\inetpub\wwwroot\src\Casper-API-PHP\CasperAgent.php:163 Stack trace: #0 C:\inetpub\wwwroot\src\Casper-API-PHP\CasperAgent.php(73): CasperAgent->request('/snapchat/attes...', Array) #1 C:\inetpub\wwwroot\src\Casper-API-PHP\CasperAPI.php(73): CasperAgent->get('/snapchat/attes...') #2 C:\inetpub\wwwroot\src\snapchat.php(151): CasperAPI->getSnapchatAttestation('qN2NRC/kQLfBm86...') #3 C:\inetpub\wwwroot\src\snapchat.php(362): Snapchat->getAttestation('logiiiiin', 'password', 1444501775145) #4 C:\inetpub\wwwroot\script\all\lounaaxx.php(126): Snapchat->login('password') #5 {main} thrown in C:\inetpub\wwwroot\src\Casper-API-PHP\CasperAgent.php on line 163

Can someone explain it to me ? Because i've the right files at the right place. So what is wrong ? Thanks a lot to provide us this really nice services and support.

teknogeek commented 9 years ago

it seems that you have removed the ca_bundle.crt from that parent directory. that file is used to try to fix SSL errors

tucogit commented 9 years ago

But my files is present : http://puu.sh/kFoeL/42237b9f2f.png

teknogeek commented 9 years ago

ahhh. sec i have to make a code change...

tucogit commented 9 years ago

Okey thanks a lot!

teknogeek commented 9 years ago

try now

teknogeek commented 9 years ago

using the latest commit

tucogit commented 9 years ago

exactly the same error with the latest commit

tucogit commented 9 years ago

it should work i don't understand

teknogeek commented 9 years ago

pull again, just redid the commit

tucogit commented 9 years ago

Same error with the latest commit

curl_setopt($ch, CURLOPT_CAINFO, __DIR__."..".DIRECTORY_SEPARATOR."ca_bundle.crt");

the error :

Fatal error: Uncaught exception 'CasperException' with message 'error setting certificate verify locations: CAfile: C:\inetpub\wwwroot\src\Casper-API-PHP..\ca_bundle.crt CApath: none' in C:\inetpub\wwwroot\src\Casper-API-PHP\CasperAgent.php:163 Stack trace: #0 C:\inetpub\wwwroot\src\Casper-API-PHP\CasperAgent.php(73): CasperAgent->request('/snapchat/attes...', Array) #1 C:\inetpub\wwwroot\src\Casper-API-PHP\CasperAPI.php(73): CasperAgent->get('/snapchat/attes...') #2 C:\inetpub\wwwroot\src\snapchat.php(151): CasperAPI->getSnapchatAttestation('7tv/T7JPeMbVIUZ...') #3 C:\inetpub\wwwroot\src\snapchat.php(362): Snapchat->getAttestation('loggg', 'passw', 1444502906778) #4 C:\inetpub\wwwroot\script\all\lounaa.php(126): Snapchat->login('password') #5 {main} thrown in C:\inetpub\wwwroot\src\Casper-API-PHP\CasperAgent.php on line 163

tucogit commented 9 years ago

it works fine if I put the fullpath :

curl_setopt($ch, CURLOPT_CAINFO, "C:\inetpub\wwwroot\src\ca_bundle.crt");

teknogeek commented 9 years ago

ok pull one more time xD

liamcottle commented 9 years ago

yolo

tucogit commented 9 years ago

it's fixed now aha, great job and thanks a loooot :p

teknogeek commented 9 years ago

no problemo :+1: