Bellton Posted June 10, 2009 Share Posted June 10, 2009 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? :-\ Quote Link to comment https://forums.phpfreaks.com/topic/161697-what-is-this-dbphp-that-i-need/ Share on other sites More sharing options...
wildteen88 Posted June 10, 2009 Share Posted June 10, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/161697-what-is-this-dbphp-that-i-need/#findComment-853191 Share on other sites More sharing options...
youngmonkey Posted June 10, 2009 Share Posted June 10, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/161697-what-is-this-dbphp-that-i-need/#findComment-853286 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.