1

When I load my application I get this:

Fatal error: Uncaught exception 'Google\Cloud\Core\Exception\ServiceException' with message 'Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information' in C:\xampp\htdocs\CarLookup\vendor\google\cloud-core\RequestWrapper.php:253

I am trying to follow this: Google Vision Doc

I have run the command: composer require google/cloud-vision

Then on the Client Libary it is saying I have to set up a Client Library? I have done this with all he correct things then it says to-:

Next, provide the credentials to your application code by setting the environment variable GOOGLE_APPLICATION_CREDENTIALS to point to the JSON file you downloaded in the previous step.

And the execute this: set GOOGLE_APPLICATION_CREDENTIALS=<path_to_service_account_file>

Where I am stuck is, where do I execute this, how do I set the environment variable?

Shaun Moore
  • 118
  • 9

1 Answers1

0

So, once you generate the JSON credentials you add this to your PHP script.

putenv("GOOGLE_APPLICATION_CREDENTIALS=./my-project-e024c2b175e0.json");

It will then show another error about SSL certificate error...

Proceed here: cURL error 60: SSL certificate prblm: unable to get local issuer certificate

Martin Zvarík
  • 2,120
  • 22
  • 27