Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught Error: Class 'Google_Client' not found in... #1784

Closed
ghost opened this issue Feb 9, 2020 · 3 comments
Closed

Fatal error: Uncaught Error: Class 'Google_Client' not found in... #1784

ghost opened this issue Feb 9, 2020 · 3 comments
Labels
type: question Request for information or clarification. Not an issue.

Comments

@ghost
Copy link

ghost commented Feb 9, 2020

Hi, I am getting this error when trying to use Google_Client class:

Fatal error: Uncaught Error: Class 'Google_Client' not found in ... Stack trace: #0 ...(4): require_once() #1 {main} thrown in ... on line 12

Details:
PHP 7.2
Release 2.4.0
Not using composer

Code:

require_once 'google-api-php-client/autoload.php';
$gClient = new Google_Client(); // Line 12
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Feb 10, 2020
@jdpedrie jdpedrie added type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. labels Feb 10, 2020
@jdpedrie
Copy link
Contributor

There is no autoload.php in the root of the v2 branch. If you are using the downloadable release, include google-api-php-client/vendor/autoload.php instead. If you're cloning the repository, this will not work unless you run composer install.

@ghost
Copy link
Author

ghost commented Feb 10, 2020

Thanks, It worked.

@ghost ghost closed this as completed Feb 10, 2020
@marzuq-aamir
Copy link

Thanks, It worked

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants