Bonjour les développeurs,

J'essaye d'utiliser, aller d'installer le client de google pour accéder en
premier temps aux événements d'un calendrier et par la suite à des photos.

Mais voila, depuis deux semaines, j'éprouve des problème pour l’installation ainsi que l'initialisation.

le framework de google a été importer avec Composer dans le dossier test.
j'ai crée et importer le service_account pour les transaction de serveur à serveur.

Merci d'avance pour l'aide que vous pourriez me fournir.

/test/calendar.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
<?php
  require_once __DIR__.'/vendor/autoload.php';
 
  putenv('GOOGLE_APPLICATION_CREDENTIALS=../keys/RASCTR-48cf9050dfc3.json');
 
  $client = new Google_Client();
  $client->useApplicationDefaultCredentials();
 
  $calendarService = new Google_Service_Calendar($client);
 
  $calendarList = $calendarService->calendarList->listCalendarList();
 
?>
les erreurs :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
Fatal error: Uncaught Error: Call to undefined function Firebase\JWT\openssl_sign() in C:\Apache24\htdocs\RASCTR\test\vendor\firebase\php-jwt\src\JWT.php:199 Stack trace: #0 C:\Apache24\htdocs\RASCTR\test\vendor\firebase\php-jwt\src\JWT.php(170): Firebase\JWT\JWT::sign('eyJ0eXAiOiJKV1Q...', '-----BEGIN PRIV...', 'RS256') #1 C:\Apache24\htdocs\RASCTR\test\vendor\google\auth\src\OAuth2.php(1268): Firebase\JWT\JWT::encode(Array, '-----BEGIN PRIV...', 'RS256') #2 C:\Apache24\htdocs\RASCTR\test\vendor\google\auth\src\OAuth2.php(418): Google\Auth\OAuth2->jwtEncode(Array, '-----BEGIN PRIV...', 'RS256') #3 C:\Apache24\htdocs\RASCTR\test\vendor\google\auth\src\OAuth2.php(451): Google\Auth\OAuth2->toJwt() #4 C:\Apache24\htdocs\RASCTR\test\vendor\google\auth\src\OAuth2.php(492): Google\Auth\OAuth2->generateCredentialsRequest() #5 C:\Apache24\htdocs\RASCTR\test\vendor\google\auth\src\Credentials\ServiceAccountCredentials.php(115): Google\Auth\OAuth2->fetchAuthToken(Object(Google\Auth\HttpHandler\Guzzle5HttpHandler)) #6 C:\Apache24\ht in C:\Apache24\htdocs\RASCTR\test\vendor\firebase\php-jwt\src\JWT.php on line 199