Try putting this line before require line:
ini_set('include_path', '/your_full_path/to_your_/ZendFramework/library');

scs

On Tue, Jun 29, 2010 at 9:50 AM, Louie Miranda <[email protected]> wrote:

> I am trying ZF as a loose class, but I am failing when connecting to a db.
>
> I have added the ZF library on php.ini includes and created a file.
>
> test01.php
>
> <?php
> require_once 'Zend/Db.php';
> $db = new Zend_Db_Adapter_Pdo_Mysql(array(
>     'host'     => '192.168.1.33',
>     'username' => 'dba',
>     'password' => 'pass',
>     'dbname'   => 'database'
> ));
>
> print_r($db);
> ?>
>
> The error is, PHP Fatal error:  Class 'Zend_Db_Adapter_Pdo_Mysql' not found
>
>
> I believe Zend/Db.php is trying to look for the adapater inside the
> /test/test01.php directory? What should I do to correct this? and is this
> proper?
> --
> Louie Miranda
> - Email: [email protected]
> - Web: http://www.louiemiranda.com
>
>

Reply via email to