php-samples icon indicating copy to clipboard operation
php-samples copied to clipboard

Error trying to run quickstart.php example

Open TxarlyM opened this issue 5 years ago • 2 comments

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

  • PHP version (php -v): PHP 7.4.2 (cli) (built: Jan 21 2020 17:52:43) ( ZTS Visual C++ 2017 x64 )
  • OS (Mac/Linux/Windows): Microsoft Windows [Versión 10.0.18362.592]

TxarlyM avatar Feb 10 '20 17:02 TxarlyM

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

cschroederhidalgo avatar Mar 05 '20 18:03 cschroederhidalgo

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

CarlosCordova1 avatar Mar 06 '20 16:03 CarlosCordova1