2

I've a problem with PEAR (PHP). This is the error:

Warning: require_once(DB.php): failed to open stream: No such file or directory in /WWW/xxx.php on line 2
Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.:/usr/share/php:/usr/share/pear') in /WWW/xxx.php on line 2

I've already installed PEAR (version 1.9.0) In my PHP file the first two lines are these:

1- <?php
2- require_once('DB.php');

Where's the problem? Thank you all!

1
  • Have you checked if the file DB.php exists in the include path? Commented Nov 7, 2011 at 12:37

2 Answers 2

6

You need to install the module:

pear install DB

Although this page gives a warning about this package being superseded (not deprecated) by MDB2.

Sign up to request clarification or add additional context in comments.

1 Comment

If you get XML Extension not found message, you first need to install php-xml package with sudo apt-get install php-xml (assuming Debian/Ubuntu).
3

You can also install module without using pear:

With Fedora/CentOS:

  • yum install php-pear-DB

With Debian/Ubuntu:

  • apt-get install php-db

-- Dario

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.