0

I am using the Zend_Gdata plugin to authenticate Youtube account credentials in our web application using cakephp 1.2 .

The Zend/Gdata/ClientLogin.php file is used to call the authentication methods in our youtube controller file as follows :

App::import('Vendor', 'Zend_Gdata_ClientLogin', true, false,'Zend/Gdata/ClientLogin.php');

The Zend library is in the "vendors" folder as required and thus the above import should work .

But the application hangs when it reaches this line when hosted in Linux environments. It works fine in Windows .

I have tried to pinpoint where the error could be but since the ClientLogin.php file is not imported, i cannot seem to go further .

Are there specific steps to configure the Zend library in a linux environment other than windows ? or for cakephp 1.2 ?

Any help on this matter is greatly appreciated. I have been stuck on this for a couple of days now :S

Thanks a lot in advance .

1 Answers1

0

Create a file in Vendor named zend_include_path.php and put the code below :

set_include_path(implode(PATH_SEPARATOR, array(
        dirname(__FILE__) . '/ZendGdata/library',
        get_include_path(),
    )));

in your controller :

App::import('Vendor', 'zend_include_path');
App::import('Vendor', 'Zend_Gdata', true, false, 'Zend/Gdata.php');
Zend_Loader::loadClass('Zend_Gdata_YouTube');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); 

Now you can able to use below methods.

$httpClient = Zend_Gdata_ClientLogin::getHttpClient();
Govind Totla
  • 1,128
  • 13
  • 16