Problem with using Zend library

#1
[eluser]shinokada[/eluser]
I am reading this website. And I followed the instruction. However I am getting error messages. Could anyone tell me what I am doing wrong?

In the instruction it says the followings.
I changed my frickr code to YOUR_FLICKR_API_KEY.

+++++++++++++++++++++++++

1. Download Zend Framework from the official website.
2. Unzip the Zend Framework package, and copy the Zend folder (under Library) to your CodeIgniter installation’s application/libraries/. You can actually place the folder anywhere, but remember to alter the script accordingly (read the comments in the script!).
3. Place the library script (provided at the end of the post) in application/libraries/
4. Done! That’s all you need to do. Now, let us see an example of using the library.

Code:
<?php

class Welcome extends Controller {

    function Welcome()
    {
        parent::Controller();
    }

    function index()
    {
        $this->load->library('zend', 'Zend/Service/Flickr');
        // newer versions of CodeIgniter have updated its loader API slightly,
        // we can no longer pass parameters to our library constructors
        // therefore, we should load the library like this:
        // $this->load->library('zend');
        // $this->zend->load('Zend/Service/Flickr');

        $flickr = new Zend_Service_Flickr('YOUR_FLICKR_API_KEY');

        $results = $flickr->tagSearch('php');
        foreach ($results as $result)
        {
            echo $result->title . '<br />';
        }
        //$this->load->view('welcome_message');
    }
}
?&gt;


Code:
&lt;?php if (!defined('BASEPATH')) {exit('No direct script access allowed');}

/**
* Zend Framework Loader
*
* Put the 'Zend' folder (unpacked from the Zend Framework package, under 'Library')
* in CI installation's 'application/libraries' folder
* You can put it elsewhere but remember to alter the script accordingly
*
* Usage:
*   1) $this->load->library('zend', 'Zend/Package/Name');
*   or
*   2) $this->load->library('zend');
*      then $this->zend->load('Zend/Package/Name');
*
* * the second usage is useful for autoloading the Zend Framework library
* * Zend/Package/Name does not need the '.php' at the end
*/
class CI_Zend
{
    /**
     * Constructor
     *
     * @param    string $class class name
     */
    function __construct($class = NULL)
    {
        // include path for Zend Framework
        // alter it accordingly if you have put the 'Zend' folder elsewhere
        ini_set('include_path',
        ini_get('include_path') . PATH_SEPARATOR . APPPATH . 'libraries');

        if ($class)
        {
            require_once (string) $class . EXT;
            log_message('debug', "Zend Class $class Loaded");
        }
        else
        {
            log_message('debug', "Zend Class Initialized");
        }
    }

    /**
     * Zend Class Loader
     *
     * @param    string $class class name
     */
    function load($class)
    {
        require_once (string) $class . EXT;
        log_message('debug', "Zend Class $class Loaded");
    }
}

?&gt;


My errors.

Code:
Warning: include(application/errors/error_php.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\ci_day4\system\libraries\Exceptions.php on line 161

Warning: include() [function.include]: Failed opening 'application/errors/error_php.php' for inclusion (include_path='application/my_classes/') in C:\xampp\htdocs\ci_day4\system\libraries\Exceptions.php on line 161

Warning: include(application/errors/error_php.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\ci_day4\system\libraries\Exceptions.php on line 161

Warning: include() [function.include]: Failed opening 'application/errors/error_php.php' for inclusion (include_path='application/my_classes/') in C:\xampp\htdocs\ci_day4\system\libraries\Exceptions.php on line 161

Warning: include(application/errors/error_php.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\ci_day4\system\libraries\Exceptions.php on line 161

Warning: include() [function.include]: Failed opening 'application/errors/error_php.php' for inclusion (include_path='application/my_classes/') in C:\xampp\htdocs\ci_day4\system\libraries\Exceptions.php on line 161

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='application/my_classes/') in C:\xampp\htdocs\ci_day4\application\my_classes\Zend\Http\Client.php on line 27


Messages In This Thread
Problem with using Zend library - by El Forum - 10-03-2009, 10:55 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.