googleworkspace / php-samples

PHP samples for Google Workspace APIs
Apache License 2.0
288 stars 347 forks source link

Error trying to run quickstart.php example #60

Open TxarlyM opened 4 years ago

TxarlyM commented 4 years ago

After I tried to execute the first example of the Google API Tutorial quickstart.php. I obtained the following error message ;

PHP Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\calendario\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 67

Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\calendario\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 67 No upcoming events found.

Specifications

cschroederhidalgo commented 4 years ago

Class 'Google\Auth\OAuth2' not found! please . I can't find the class 'Google \ Auth \ OAuth2'. Does anyone know where to download the class Google \ Auth \ OAuth2.php ???

When I try to test the google drive API ( https://developers.google.com/drive/api/v3/quickstart/php ), I get the error: PHP Warning: include_once(Google\Auth\OAuth2.php): failed to open stream: No such file or directory in /public_html/manager/library/Zend/Loader.php on line 83

Warning: include_once(Google\Auth\OAuth2.php): failed to open stream: No such file or directory in /public_html/manager/library/Zend/Loader.php on line 83 PHP Warning: include_once(): Failed opening 'Google\Auth\OAuth2.php' for inclusion (include_path='/public_html/manager/library:/public_html/manager/application/models:.:/usr/share/pear:/usr/share/php') in /public_html/manager/library/Zend/Loader.php on line 83

Warning: include_once(): Failed opening 'Google\Auth\OAuth2.php' for inclusion (include_path='/public_html/manager/library:/public_html/manager/application/models:.:/usr/share/pear:/usr/share/php') in /public_html/manager/library/Zend/Loader.php on line 83 PHP Fatal error: Class 'Google\Auth\OAuth2' not found in /public_html/manager/library/Google/Client.php on line 988

Fatal error: Class 'Google\Auth\OAuth2' not found in /public_html/manager/library/Google/Client.php on line 988

I searched the internet for the class Google/Auth/OAuth2.php . But I can't find it

CarlosCordova1 commented 4 years ago

Look my code, i hope can help you https://github.com/CarlosCordova1/readGoogleSheetsphp/blob/master/index.php