Error occurred : Class 'Google_Config' not found

Fermé
Topson1 Messages postés 14 Date d'inscription mardi 27 février 2018 Statut Membre Dernière intervention 24 septembre 2019 - 1 sept. 2018 à 19:09
jordane45 Messages postés 38167 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 7 mai 2024 - 1 sept. 2018 à 19:15
Bonjour,
comment ca va
J'ai un problème avec mon site SVP aider moi

Error occurred : Class 'Google_Config' not found on line 81 in /home/u444546650/public_html/includes/libraries/Google/src/Google/Client.php


<?php
/*
 * Copyright 2010 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

require_once realpath(dirname(__FILE__) . '/../../autoload.php');

/**
 * The Google API Client
 * http://code.google.com/p/google-api-php-client/
 *
 * @author Chris Chabot <chabotc@google.com>
 * @author Chirag Shah <chirags@google.com>
 */
class Google_Client
{
  const LIBVER = "1.1.2";
  const USER_AGENT_SUFFIX = "google-api-php-client/";
  /**
   * @var Google_Auth_Abstract $auth
   */
  private $auth;

  /**
   * @var Google_IO_Abstract $io
   */
  private $io;

  /**
   * @var Google_Cache_Abstract $cache
   */
  private $cache;

  /**
   * @var Google_Config $config
   */
  private $config;

  /**
   * @var Google_Logger_Abstract $logger
   */
  private $logger;

  /**
   * @var boolean $deferExecution
   */
  private $deferExecution = false;

  /** @var array $scopes */
  // Scopes requested by the client
  protected $requestedScopes = array();

  // definitions of services that are discovered.
  protected $services = array();

  // Used to track authenticated state, can't discover services after doing authenticate()
  private $authenticated = false;

  /**
   * Construct the Google Client.
   *
   * @param $config Google_Config or string for the ini file to load
   */
  public function __construct($config = null)
  {
    if (is_string($config) && strlen($config)) {
      $config = new Google_Config($config);
    } else if ( !($config instanceof Google_Config)) {
      $config = new Google_Config($config);

1 réponse

jordane45 Messages postés 38167 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 7 mai 2024 4 657
1 sept. 2018 à 19:15
Bonjour,
Le souci se situe à cette ligne donc
   $config = new Google_Config($config);

Et indique qu'il n'arrive pas à instancier la class Google_Config

Es-tu sûr d'avoir chargé le bon autoload ?
Celui récupéré avec l'API ou celui fourni via composer (si tu as installé via composer) ?

Au cas où:
Le téléchargement des fichiers et leur doc se trouve ici :
https://github.com/googleapis/google-api-php-client

0