Link to home
Start Free TrialLog in
Avatar of APD Toronto
APD TorontoFlag for Canada

asked on

Error when installing API client with Composer

Hi Experts,

When I try installing Google API Client as mentioned under step 2 of https://developers.google.com/google-apps/calendar/quickstart/php with the following command from the command prompt

php composer.phar require google/apiclient:^2.0

Open in new window


...I get the following errors

---
- https://github.com/google/google-api-php-client-services.git
fatal: destination path 'C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-
project.com\utilities\google_calendar\vendor\google\apiclient-services' alr
eady exists and is not an empty directory.

- git@github.com:google/google-api-php-client-services.git
fatal: destination path 'C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-
project.com\utilities\google_calendar\vendor\google\apiclient-services' alr
eady exists and is not an empty directory.
---

Open in new window


because it is giving me ...already exists and is not an empty directory. I completely delete 'C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar\vendor directory and run the code above again from c:\...\google_calendar. Same error even if I deleted it.

As well I am running PHP under IIS with Plesk.

If I am ignoring the above error and still use my application I get

" <br />
<b>Warning</b>:  require_once(C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar/vendor/autoload.php): failed to open stream: No such file or directory in <b>C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar\index.php</b> on line <b>80</b><br />
<br />
<b>Fatal error</b>:  require_once(): Failed opening required 'C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar/vendor/autoload.php' (include_path='.;.\includes;.\pear.;C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\PEAR') in <b>C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar\index.php</b> on line <b>80</b><br />
"

Open in new window


Any help will be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of APD Toronto

ASKER

Using the alternate method worked just fine on my local development server, but when I repeated the exact same steps on the live server I get

Fatal error: Uncaught GuzzleHttp\Ring\Exception\RingException: cURL error 77: error setting certificate verify locations: CAfile: C:\Program Files (x86)\Parallels\Plesk\Additional\PHPSettings\cacert.pem CApath: none in C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php:127 Stack trace: #0 C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php(91): GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Array, Array, Array) #1 C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar\vendor\guzzlehttp\ringphp\src\Client\CurlHandler.php(96): GuzzleHttp\Ring\Client\CurlFactory::createResponse(Array, Array, Array, Array, Resource id #12) #2 C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar\vendor\guzzlehttp\ringphp\src\Client\CurlHandler.php(68): GuzzleHttp\Ring\Client\CurlHandler->_invokeA in C:\Inetpub\vhosts\aces-project.com\crm-cor.aces-project.com\utilities\google_calendar\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 51

Open in new window

By the way, on my local server I am not using any type of SSL.