Where is DB.php file located?

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

Threaded View

I just downloaded, compiled and installed
PHP 5 in my Redhat Linux enterprise 3 update 4.

I try to connected to PostgreSQL database

I got error on line

Warning: main(DB.php) [function.main]: failed to open stream: No such
file or directory in /var/www/html/hads/PHP/states.php on line 7

Fatal error: main() [function.require]: Failed opening required 'DB.php'
(include_path='.:/php/includes:/usr/local/lib/php') in
/var/www/html/hads/PHP/states.php on line 7

According to O'Reilly book Programming PHP
by Rasmus Lerdorf & Kevin Tatroe
The PEAR DB library is comes with PHP.
But I coun't find that file anywhere
in the system.

find / -name "DB.php" -print

This is the options I used below for config

'./configure' '--prefix=/usr/local' '--enable-calenda' '--enable-ftp'
'--with-apxs2=/usr/sbin/apxs' '--with-pgsql=/var/lib/pgsql'
'--with-libxml-dir=/usr/local/lib' '--with-xsl=/usr/local/lib'

Did I do something wrong? Please tell me how to
correct this.

Thank Q very much in advance!

Re: Where is DB.php file located?

Quoted text here. Click to load it

pear config-show

 ... would give you the pear configuration - if it doesn't, then something's

 /usr/local/lib/php which is on your include_path according to the error
message would be consistent with where PEAR normally puts files.

 My PHP 5.0.4 installation does NOT have the DB module installed, so it doesn't
come with PHP 5.0.4.


pear install DB

<http://www.andyhsoftware.co.uk/space Space: disk usage analysis tool

Re: Where is DB.php file located?

Andy Hassall wrote:

Quoted text here. Click to load it

I have 5.0.4, too
Just issued the
pear install DB
It auto downloaded and installed
Great! Thanks a lot!

Site Timeline