I have followed the getting started page closely.

<https://cloud.google.com/natural-language/docs/reference/libraries#client-libraries-install-php>

The example code has the following: *$projectId = 'YOUR\_PROJECT\_ID';*

I fill in my project id taken from the json file and the Google console--e.g. "$projectID = 'myproject-197218'" and I always get a fatal error with "Permission Denied." 

I have set the env variable, run composer to install the library. And, I created the Google json file. I am running the example in PHP code.

I am running the code on my local server (xampp).