PEAR:DB Extension not found

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I can't seem to get PEAR to work, but I think it's installed. Any

phpinfo() says '--with-pear=/usr/local/apache/php-pear'

$ which pear
$ pear list
Installed packages:
Package        Version State
Archive_Tar    1.1     stable
Console_Getopt 1.2     stable
DB             1.7.6   stable
HTTP           1.2.2   stable
Mail           1.1.3   stable
Net_SMTP       1.2.3   stable
Net_Socket     1.0.1   stable
PEAR           1.3.2   stable
XML_Parser     1.0.1   stable
XML_RPC        1.1.0   stable
$ pear info db
About DB-1.7.6
Provides        Classes: DB, DB_common, DB_dbase, DB_fbsql,
                DB_ibase, DB_ifx, DB_msql, DB_mssql, DB_mysql,
                DB_mysqli, DB_oci8, DB_odbc, DB_pgsql,
                DB_sybase, DB_storage, DB_sqlite
Package         DB
Summary         Database Abstraction Layer
Description     DB is a database abstraction layer providing:
                * an OO-style query API
                * portability features that make programs
                written for one DBMS work with other DBMS's
                * a DSN (data source name) format for specifying
                database servers
                * prepare/execute (bind) emulation for databases
                that don't support it natively
                * a result object for each query response
                * portable error codes
                * sequence emulation
                * sequential and non-sequential row fetching as
                well as bulk fetching
                * formats fetched rows as associative arrays,
                ordered arrays or objects
                * row limit support
                * transactions support
                * table information interface
                * DocBook and phpDocumentor API documentation

                DB layers itself on top of PHP's existing
                database extensions.

                Drivers for the following extensions pass
                the complete test suite and provide
                interchangeability when all of DB's
                portability options are enabled:

                 fbsql, ibase, informix, msql, mssql,
                 mysql, mysqli, oci8, odbc, pgsql,
                 sqlite and sybase.

                There is also a driver for the dbase
                extension, but it can't be used
                interchangeably because dbase doesn't
                support many standard DBMS features.

                DB is compatible with both PHP 4 and PHP 5.
Version         1.7.6
Release Date    2005-04-11
Release License PHP License
Release State   stable
Release Notes   common:
                * Fix the docblocks regarding
                DB_FETCHMODE_FLIPPED.  Bug 4027.

                * Provide BC hack for those connecting to oci8
                using 'hostspec' instead of 'database'.  Bug
Release Deps    PHP >= 4.2.0
                Package PEAR >= 1.0b1
Last Modified   2006-01-13
$ php josh_test.php  // sample code
DB Error: extension not found

Re: PEAR:DB Extension not found

On Fri, 13 Jan 2006 06:50:29 -0800, joshua.wehner wrote:

Quoted text here. Click to load it

You forgot to set include_path in your php.ini
Here is what I have set it to:

include_path = ".:/usr/local/lib/php:/usr/local/PHP"

/usr/local/PHP contains 3rd party packages, like ADOdb and jpgraph,
while /usr/local/lib/php contains all of my PEAR treasures.


Re: PEAR:DB Extension not found

Thanks for the suggestion.

Unfortunately, doesn't have any effect on the system; I still can't use
PEAR:DB in scripts ("extension not found").

It looks like there are two installations of PEAR on my system: one in
/usr/local/apache/php-pear and another in /usr/local/lib/php. Both of
them have a DB.php extension; setting either in my include_path doesn't
change things.

Re: PEAR:DB Extension not found

On Fri, 13 Jan 2006 10:31:31 -0800, joshua.wehner wrote:

Quoted text here. Click to load it

OK, what does phpinfo() say, where is Waldo? Which ini file is being used?


Site Timeline