Jump to content

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.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.