Open eduardo-g-silva opened 7 years ago
I fixed the same problem installing the twillio SDK:
composer require twilio/sdk
Class filipajdacic\yiitwilio\YiiTwilio does not exist
error occurs any one have solution for it?
I experienced the same error. Reflection exception. I am using the yii2 advanced template and had to restructure directories to work online. Worked fine on my wampserver but not online.
Solution: File: vendor\filipajdacic\YiiTwilio.php
Add vendor to namespace:
was: namespace filipajdacic\yiitwilio; now: namespace vendor\filipajdacic\yiitwilio;
File: frontend\config\main.php
Include vendor in class.
was:
'Yii2Twilio' => [
'class' => 'filipajdacic\yiitwilio\YiiTwilio',
'account_sid' => '***',
'auth_key' => '**',
],
now:
'Yii2Twilio' => [ 'class' => 'vendor\filipajdacic\yiitwilio\YiiTwilio', 'account_sid' => '***', 'auth_key' => '**',
I did not have to change my bootstrap.php under common/config directory nor alter my autoload namespaces.
Receiving trial texts via Twilio at last!
To avoid SSL problems on my wampserver and apache setup: I had to add: CURLOPT_SSL_VERIFYPEER => false,
to the ....\vendor\twilio\sdk\Twilio\Http\Curlclient.php
Solution:
CURLOPT_URL => $url,
CURLOPT_HEADER => true,
CURLOPT_RETURNTRANSFER => true,
//added here
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_INFILESIZE => Null,
CURLOPT_HTTPHEADER => array(),
CURLOPT_TIMEOUT => $timeout,
Don't forget to take this line out once you are up and running.
Hi there,
I found some problems when you try to instanciate the twillio classs
here is how i fix it: