Jump to content

What is this DB.php that I need?


Bellton

Recommended Posts

OMG so I've ben working on this code for 2 days straight. Cant fix it!

 

Im getting these error messages:

--------------------------------------

Warning: include(DB.php) [function.include]: failed to open stream: No such file or directory in public_html/2127551019/dbconnect.php on line 3

 

Warning: include() [function.include]: Failed opening 'DB.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in public_html/2127551019/dbconnect.php on line 3

 

Fatal error: Class 'DB' not found in public_html/2127551019/dbconnect.php on line 10

---------------------------------------

 

Why am I getting this error message?

I do not have a DB.php file. Why do I need it? I already have a dbconnect.php. Can I simply remove this line from my dbconnect.php file? or should I re-write my dbconnect.php file?

 

<?php

  // load the database library 

  include('DB.php');  

 

  $dbtype = "*"; 

  $dbuser = "*"; 

  $dbpassword = "*"; 

  $dbhost = "*"; 

  $dbname = "*";

  $connection = $dbtype.'://'.$dbuser.':'.$dbpassword.'@'.$dbhost.'/'.$dbname;  $database = DB::connect($connection);?>

 

What can I do to make this work?  :-\

Link to comment
https://forums.phpfreaks.com/topic/161697-what-is-this-dbphp-that-i-need/
Share on other sites

By looking at your code for dbconnect.php, you will need this file in order for your script to work.

 

Is this your script you have made yourself or some third party script you grabbed from somewhere else, in this case you should get in contact with the original developer and read the documentation.

Hi,

 

Looks like you need the PEAR DB package here. Assuming you have pear installed on your system, try "pear install db" on your shell/command prompt.

If you do not have pear installed, google to find out how to install pear for your OS. Look at http://pear.php.net/package/DB for details.

 

Why you need it: Probably because whoever wrote that code wanted to use the database abstraction layer provided by the PEAR DB package.

 

M.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.