Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstart Error #66

Open
Eharth opened this issue Jun 11, 2020 · 6 comments
Open

Quickstart Error #66

Eharth opened this issue Jun 11, 2020 · 6 comments

Comments

@Eharth
Copy link

Eharth commented Jun 11, 2020

(Please search existing issues before creating a new one.)

error
PHP Warning: count(): Parameter must be an array or an object that implements Countable in D:\quickstart\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 67
PHP Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in D:\quickstart\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:187
Stack trace:
#0 D:\quickstart\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection()
#1 D:\quickstart\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError()
#2 D:\quickstart\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish()
#3 D:\quickstart\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke()
#4 D:\quickstart\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler{closure}()
#5 D:\quickstart\vendor\guzzlehttp\guzzle\src\PrepareBodyMiddleware.php(72): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler{closure}()
#6 D:\quickstart\v in D:\quickstart\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 187

Expected Behavior

Actual Behavior

evry time I try to run php quickstart.php it shows me to open the link and enter the verificatin code

Steps to Reproduce the Problem

  1. the same steps described in quickstart section

Specifications

  • PHP version (php 7.4.4):
  • OS (Windows):
@wiifree
Copy link

wiifree commented Jul 12, 2020

Same problem. Please solve this.

@llelundberg
Copy link

llelundberg commented Jul 15, 2020

Similar problem. When I run php quickstart.php in cli i get:

`PHP Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\familjekalender\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\familjekalender\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 67
No upcoming events found.`

PHP 7.4.7 (cli) (built: Jun 9 2020 13:36:15) ( ZTS Visual C++ 2017 x64 )

@wiifree
Copy link

wiifree commented Jul 15, 2020

i found a solution. if you run the install command composer require google/apiclient:^2.0 via composer, composer install version 2.0. but the latest version can be found here. check if the "^" is in the composer.json by the google client and run the command composer update. this solve the problem.

@llelundberg
Copy link

Thank you, that solved the problem.

To clarify for others: The composer.json contained: "require": { "google/apiclient": "2.0" }

Changed to: "require": { "google/apiclient": "^2.0" }

The problem was caused by the Windows command line, the ^ is a special character. Example:

C:>echo composer require google/apiclient:^2.0
composer require google/apiclient:2.0

The special character need to be escaped when following the quickstart guide. Perhaps this should be a new issue? Can anyone come up with a cross-platform command to type in the quickstart guide? Something that works in both CMD and bash?

@llelundberg
Copy link

composer require "google/apiclient:^2.0" would work in windows command line. Would it break anything in bash or other consoles?

@ghost
Copy link

ghost commented Nov 20, 2020

I did "^" thing but my cmd shows vendor folder files list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants