dirkgroenen / pinterest-api-php

A PHP wrapper for the official Pinterest API. :pushpin:
https://developers.pinterest.com/docs/getting-started/introduction/
Apache License 2.0
173 stars 76 forks source link

Error Loader.php on line 75 #51

Closed samphors closed 8 years ago

samphors commented 8 years ago

I got this error when I typed "composer update" to get vendor folder and after that I started to do nothing, I tried to access to the file, and I saw this message :

Fatal error: Uncaught exception 'Dotenv\Exception\InvalidPathException' with message 'Unable to read the environment file at C:\xampp\htdocs\pinterst_fancybox\demo\.env.' in C:\xampp\htdocs\pinterst_fancybox\vendor\vlucas\phpdotenv\src\Loader.php:75 Stack trace: #0 C:\xampp\htdocs\pinterst_fancybox\vendor\vlucas\phpdotenv\src\Loader.php(52): Dotenv\Loader->ensureFileIsReadable() #1 C:\xampp\htdocs\pinterst_fancybox\vendor\vlucas\phpdotenv\src\Dotenv.php(50): Dotenv\Loader->load() #2 C:\xampp\htdocs\pinterst_fancybox\demo\boot.php(9): Dotenv\Dotenv->load() #3 C:\xampp\htdocs\pinterst_fancybox\demo\index.php(1): require('C:\\xampp\\htdocs...') #4 {main} thrown in C:\xampp\htdocs\pinterst_fancybox\vendor\vlucas\phpdotenv\src\Loader.php on line 75

dirkgroenen commented 8 years ago

Dotenv is used in the demo to read app credentials via the environment. You either have to create the .env file (as the error message is clearly saying), or remove dotenv from the example code and hard-code your app tokens.