Is this your own DB.php file, or are you trying to use the DB PEAR extension?
If it is the PEAR DB file, you need to install PEAR then download and install the DB package, but in saying that, the DB package for PEAR is now out dated and is reccommended to you use the MDB2 PEAR package. Just some available info for you:)
Open up your start menu and click on run, type in cmd then hit enter. Now I am not sure how your wamp setup directory is but I will base this on my installation, if the directory is different you will need to change it.
In the cmd (command console) type this at the prompt:
then hit enter. If all goes well it will ask you if you want to install a remote or local copy, type in 'local' without the quotes then hit enter, it will then show a directory setup for the files and give you an option to change them. Just leave them as they and just hit enter, don't type anything. This should install PEAR automically to the required files. You then need to include this in your php.ini file. Your php.ini file is stored at c:\wamp\bin\php\php5.2.5. Open this file click edit, then find and type in include_path. The line you are looking is:
I don't bin folder in my wamp folder, so I have go-pear.bat in the following folder: F:\wamp\php
so I installed the go-pear.bat and I have a folder named PEAR, also I changed the path in both php.ini, one php.ini in F:\wamp\php and one php.ini in F:\wamp\Apache2\bin, but still I have the same error.
You now need to install the DB Package for PEAR and point the files that are calling on the DB.php file to point to that folders direction.
P.S There is no need to change the php.ini file inside of the bin folder of apache. Just the one in the PHP directory:)
You will have to download the DB package and install it manually as it is not reccommended anymore. But you can update this to MDB2 when you feel your ready, for now, we will just concentrate on getting it to work. You can get this package from here PEAR DB Package
You will need a program that can extract .tgz files like winace, you can download winace. Just type in into google. Once you have extracted these files, browse through them until you see the DB.php and three Other directorys. One of those Directorys is called DB. Copy this directory and the DB.php file directly into your PEAR folder and the DB Package is now installed. Now just point the files that are calling it to the PEAR folder which will look like this:
and it should work:)
P.S Also note, that you should have a database to connect to and those settings should be configured somewhere in one of your scripts. You will need to modify these settings.
HostName: localhost // This is correct.
UserName: username // Set this to the username you used to access the database, the same as your mysql username, this will be 'root' if you have not created a new user.
PassWord: password // This is the password you use to access the database, the same as your mysql access password if you have not created another user.
DataBase: database name // The name of the database you want to connect to.
The DB.php file will not work, unless these settings are configured properly:)