Google-api-php-client: [SOLVED] Google_Service_Youtube class not found (only on a Debian Server)

Created on 11 Nov 2016  路  5Comments  路  Source: googleapis/google-api-php-client

Hi!

I developed a very little website which just shows the three last videos from a Youtube channel and other some text. The only php code is to get these videos.

To get this videos, I just use the Google Api client (Youtube Data v3) that I installed with composer. It works fine on my Wamp (local, Windows) but on the production server, I don't understand why I get
Fatal error: Uncaught Error: Class 'Google_Service_Youtube' not found in /path/to/www/index.php:12 Stack trace: #0 {main} thrown in /path/to/www/index.php on line 12

So here are the steps I followed :

  1. I installed Apache2 and configured it on my Debian server
  2. I installed the PHP7 version
  3. I uploaded my website on my Debian website folder
  4. I installed composer in this directory
  5. I initialized my project with composer, adding the google/apiclient in the same time
  6. I get the error.

Does anyone have an idea about where this error can come from?

Thanks a lot for your attention.

Most helpful comment

Windows is not case sensitive and Linux is. So try changing the reference to the class Google_Service_Youtube to Google_Service_YouTube.

All 5 comments

Windows is not case sensitive and Linux is. So try changing the reference to the class Google_Service_Youtube to Google_Service_YouTube.

I'm sorry but I don't see any difference... Maybe I didn't understand your answer (I understood for case sensitive).
EDIT : OHHHHHH ! Thanks ! This is T and not t !!! Thanks !!!

Thanks, @lasselehtinen 馃 . Couldn't for the life of me work out what I had done wrong.

It will require Google_Service_YouTube library to make it workout. Try installing the library and this error is particular for libraries.

@avinash-thombre The library was already installed. It was just a case sensitive issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slaFFik picture slaFFik  路  5Comments

armetiz picture armetiz  路  4Comments

ysaurabh33 picture ysaurabh33  路  3Comments

upendtu picture upendtu  路  4Comments

bencromwell picture bencromwell  路  3Comments