I was testing how to send sms messages via twilio API and ran into error. Below is how I fixed it
Error1:
undefined constant CURLOPT_USERAGENT
Solution:
check your php.ini file and uncomment the line (remove ;): extension=php_curl.dll
restart your apache server.
resource:
http://drupal.org/node/1044216
Error2:
SSL certificate problem, verify that the CA cert is OK
Solution:
Added the line of code
//this is a temporary fix forResource:
//Uncaught exception 'Services_Twilio_TinyHttpException' with message 'SSL certificate problem, verify that the CA cert is OK
//this may have a security flaw
//resources: https://github.com/twilio/twilio-php/issues/18 http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/
$http = new Services_Twilio_TinyHttp('https://api.twilio.com', array('curlopts' => array(
CURLOPT_SSL_VERIFYPEER => false
)));
https://github.com/twilio/twilio-php/issues/18
THANKSSSSSS YOU SAVE MY DAY !!! ^_^
ReplyDelete