By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,380 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

Where is DB.php file located?

P: n/a
RC
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

<?php
require_once('DB.php');
....
?>
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'
'--enable-xslt'

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

Thank Q very much in advance!
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Wed, 04 May 2005 16:04:42 -0400, RC <ra**********@nospam.noaa.gov> wrote:
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

<?php
require_once('DB.php');
...
?>
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

find / -name "DB.php" -print


pear config-show

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

/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.

Try:

pear install DB

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2

P: n/a
RC
Andy Hassall wrote:


pear config-show

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

Try:

pear install DB


I have 5.0.4, too
Just issued the
pear install DB
It auto downloaded and installed
Great! Thanks a lot!
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.