php - cURL issues with Google Voice "APIs" running on XAMPP/Windows 7 -
i'm using aaronpk's google voice apis send , receive sms messages in google voice. i've uncommented "extension=php_curl.dll" line in php.ini , have confirmed curl working. i'm stuck @ point , keep receiving error:
uncaught exception 'exception' message 'could not parse galx token'
i've checked basic things. username , password on account correct. thing can see curl not writing cookie files.
i know script has linux path cookiejar / cookiefile default. i've tried changing windows directory, including full path. code snippet i'm using is:
$this->_cookiefile = dirname(__file__) . "\cookies.txt";
even code modification, script not writing cookies.txt file.
i've uploaded these scripts linux host , work fine, proving me windows issue. sadly, don't have linux server production environment.
i'm looking guidance working within windows. right i'm developing on windows 7 machine running xampp. production environment windows 2008 server.
any assistance appreciated!
i know 1 rather old...but it's still nice share answer, yeah?
changing path of cookie file good, problem here curl trying (and failing) verify google's ssl certificate. 2 solutions can found here (i found link in the accepted answer other question)
for testing purposes i'd think ok use quick , dirty solution (blindly accepting ssl certificates without verifying). you'd insert following line googlevoice class constructor along other curl_setopt lines
curl_setopt($this->_ch, curlopt_ssl_verifypeer, false);
for production code, i'd verify certificate. finding , saving certificate covered in first link provided. assuming certificate in same directory googlevoice.php, you'd insert following lines
curl_setopt($this->_ch, curlopt_ssl_verifypeer, true); curl_setopt($this->_ch, curlopt_ssl_verifyhost, 2); curl_setopt($this->_ch, curlopt_cainfo, getcwd().'\builtinobjecttoken-verisignclass3publicprimarycertificationauthority.crt');
i'm no curl expert, can't if there's way verify ssl certificate (or why isn't needed on linux host.) should needs changed aaronpk's google voice api working on xampp
Comments
Post a Comment