views:

38

answers:

2

Where should i set the set_include_path for zend... i am trying to use google calendar on my site, and it works on zend.. i never used zend, i am new to stuff like that,

so on this google calendar api page it says:

Before running this sample or developing your own code which uses the Zend Framework, you may need to set the include_path and load the appropriate classes. The include path can be set using either a php.ini setting or using the set_include_path method. This code requests a ..

Where should i find the zend path? i hav a typical php-apache config. shared host

I searched a lot for it but did not find anything;

I tried st like this:

set_include_path('/usr/local/');

require_once 'usr/lib/Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');

but doesnt work

Thanks a lot!

+2  A: 

Setting it to /usr/lib should work.

Zend should then search for libraries relative to that, so it will look for

Zend_Gdata

in

/usr/lib/Zend/Gdata
Pekka
+2  A: 

To make sure your previously set include path is preserved, you can do the following:

set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/usr/lib'),
    get_include_path(),
)));
Wade Tandy