I am running Drupal6 on XAMPP 1.7.3. I am trying to use the Zend GData library. I suspect my problem is easily resolved but my knowlegde of Apache + PHP libraries is very limited and I have just spent a day failing to find a solution. Can anyone here help?
In a php file within htdocs I pointed at an existing Zend library (that exists as a requirement for another Drupal module):
- Code: Select all
require_once 'sites/all/libraries/ZendGdata/library/Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_Gbase');
I got this error message:
Fatal error: Cannot redeclare class Zend_Loader in C:\xampp\php\PEAR\Zend\Loader.php on line 31
So, next I tried to point directly at the GData classes in my php file with:
- Code: Select all
require 'sites/all/libraries/ZendGdata/library/Zend/Gdata/Gbase.php';
require 'sites/all/libraries/ZendGdata/library/Zend/Gdata/ClientLogin.php';
This stopped the redeclaration error but raised another issue:
Fatal error: Call to a member function getDOM() on a non-object in C:\xampp\php\PEAR\Zend\Gdata\App\FeedEntryParent.php on line 220
This error might well be a result of my function not working correctly but that is not my question. What I do not understand is why the error message refers to the Zend library in the xampp\php\PEAR\ folder. The GData library here is an older version than the one in my htdocs and I guess I need to understand how to use only one Zend or another.
Can anyone tell me why the error message refers to the XAMPP/PHP/PEAR/Zend library when my PHP includes the htdocs/sites/all/libraries/ZendGdata/library/Zend library?
And what is the best practise to get over this obstacle?
Thanks for reading this.
Phil