Welcome Guest, Not a member yet? Register   Sign In
Not able to use Zend class
#1

[eluser]shinokada[/eluser]
I followed these instructions.
But none of them worked.

http://www.beyondcoding.com/2008/02/21/u...deigniter/

http://freakauth.4webby.com/tutorials/us...de-igniter

Could anyone direct me to the right direction please?

Thanks in advance.
#2

[eluser]jkevinburton[/eluser]
Did you get it working?
I implemented the Zend Gdata classes yesterday....
If you need help, let me know.
#3

[eluser]shinokada[/eluser]
Thanks. I need your help.
I still can't find the way.
#4

[eluser]jkevinburton[/eluser]
it all depends the kind of help you need... if you need help setting up your Zend for CI.

this is what I did.

Step 01: Make the Zend Library Accessible
I put the "Zend" folder in the folder: /assets/classes
In your index.php:
$my_include_folder = realpath(dirname(__FILE__)).'/assets/classes';
set_include_path(get_include_path() . PATH_SEPARATOR . $my_include_folder);

Step 01: Call the Zend Framework:
In your controller or whereever you need it:
require_once('Zend/Loader.php');

Step 03: Use your selected Zend classes:
Zend_Loader::loadClass('Zend_Gdata_HttpClient');

I am using YouTube API for Zend, so I use:
Zend_Loader::loadClass('Zend_Gdata_YouTube')

and then I use the code:

$youtube = new Zend_Gdata_YouTube();
$query = $youtube->newVideoQuery();
$query->videoQuery = 'cats';
$query->startIndex = 10;
$query->maxResults = 20;
$query->orderBy = 'viewCount';

$videoFeed = $youtube->getVideoFeed($query);


So, thats pretty much it.... IMPORTANT step is setting the include path to the parent of the Zend folder....

Cheers!
#5

[eluser]jkevinburton[/eluser]
Also remember that the Zend framework is PHP5 only.
#6

[eluser]shinokada[/eluser]
Since I am using Xampp, I am having problems with paths using CI in XAMPP.

I get error message.
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\ci_zend\system\application\controllers\welcome.php on line 2

The line 2 is require_once('Zend/Loader.php');

I found that the following.

set_include_path(get_include_path() . PATH_SEPARATOR . :.;C:\xampp\php\pear\

Is it correct?
#7

[eluser]shinokada[/eluser]
Yes, I got it.

I used the following for XAMPP.

ini_set("include_path", ini_get("include_path").PATH_SEPARATOR.str_replace("/", "\\", BASEPATH)."/contrib/");
require_once 'Zend/Loader.php';

<a href="http://www.mynameisphil.net/article/may/2009/implementing-the-zend-framework-with-codeigniter/11">http://www.mynameisphil.net/article/may/2009/implementing-the-zend-framework-with-codeigniter/11</a>




Theme © iAndrew 2016 - Forum software by © MyBB