Menu

DB Test Failure

Help
2006-02-22
2013-04-16
  • Nobody/Anonymous

    I'm using Wamp server, MYSQL5.0.17-nt running on localhost as root@localhost. I have created database name : bug_tracker. I have chosen MYSQL >=4.1 , the user is root, host is localhost , password is '1234' table prefix is phpbt_(I left the default for this field). However I still get the error message :
        The installation script could not connect to the database bug_tracker on the host localhost using the specified username and password.
    Please check these details are correct and that the database already exists then retry.

    Failed loading Pear:DB
    Please check your Pear installation and the defined PEAR_PATH in install.php

    Close window

    Thanks a lot for your help

     
    • Nobody/Anonymous

      I also tried to choose Mysql<4.1 to test but there still that error. I have tried to change password in MYSQL to blank. However I still get that error when I test DB connection

       
      • Bryce Nesbitt

        Bryce Nesbitt - 2008-07-01

        Try this simple script:

        <?php

        //  A small standalone test file, to check if pear:db is working
        //  Part of php bug tracker

        echo "Your php include path is: \&quot;" . ini_get('include_path') . "\&quot;<br/>";

        define('PEAR_PATH', '');
        if (@include_once(PEAR_PATH.'DB.php')) {
            echo 'Pear DB module loaded OK!<br/>';
            } else {
            echo 'Error: Failed to load the PEAR DB.php module from the path. Check for the file "DB.php" in the path.<br/>';
            }

        $dsn = array(
        'phptype'   => 'mysqli',
        'hostspec'  => 'localhost',
        'database'  => 'bug_tracker',
        'username'  => 'xxxxxxxx',
        'password'  => 'yyyyyyyyy'
        );

        $db = DB::Connect($dsn);
        if (DB::isError($db)) {
            echo 'Failed to connect to the database: '. $db->getMessage() .'<br/>';
            } else {
            echo 'Database opened OK!<br/>';

            $result =& $db->query("SELECT bug_id,title,created_date from phpbt_bug");
            if (DB::isError ($result))
             die ("SELECT failed: " . $result->getMessage () . "\n");
            printf("Result set contains %d rows and %d columns<br/>\n",
                $result->numRows (), $result->numCols ());
            printf("<table border=1>\n");
            while ($row =& $result->fetchRow ()) {
                printf("<tr><td>%s</td><td>%s</td><td>%s</td>\n", $row[0], $row[1], $row[2]);
                }
            $result->free();
            printf("</table>\n");
            }

        //  Uncomment the next line for lots of information about php setup
        //  phpinfo(8+4);
        ?>

         
        • Nobody/Anonymous

          If you get DB test failure, it is not phpbug tracker, it's pear DB.
          You need to install the pear package.
          And the pear:DB package.
          And hope that your distribution sets up the paths correctly.  If not find "DB.php" and point the path to it.

           
    • tuxi

      tuxi - 2006-06-21

      i'm sure it's a pear or php problem ...

      did you sure having make the php.ini file in the good place ? and add the line style :

      include_path="/usr/local/php5/lib/php"

      have you set in bashrc the environment variable (my):
      export JAVA_HOME=/serveur/jdk1.5.0_06
      export JRE_HOME=/serveur/jdk1.5.0_06
      export ANT_HOME=/serveur/apache-ant-1.6.5
      export PEAR_PATH=/usr/local/php5/lib/php
      export APACHE_HOME=/usr/local/apache
      export PHP_DIR=/usr/local/php5
      export MYSQL=/usr/local/mysql
      export PATH=${PATH}:${ANT_HOME}/bin:${PEAR_PATH}/bin:${MYSQL}/bin:${PHP_DIR}/bin(END)

       
    • Nobody/Anonymous

      So where did this finish?  I have the same problem.  Also using WAMP, installed the PEAR batch file, fixed-up the include_path, but can not get the DB:PEAR to connect.  I'm going to continue searching, but have yet to find an answer.

       
    • Wes Plate

      Wes Plate - 2007-01-19

      I am trying to install on a new server to get it off the old one, and I'm having the same problem.

      Someone please help.

       
    • Nobody/Anonymous

      I've got the same problem in a hosted environment, where both PHP4 and PHP5 are available. Only the PHP5 installation seems to have the PEAR extensions configured, but the default engine is PHP4. So I had to force the webserver to use PHP5 by adding an .htaccess - file to the sript directories, containing: AddType x-mapp-php5 .php. Now the test and the application works.

       
    • Nobody/Anonymous

      i've the same problem, i use php4, i using it on a hosting, who can send me the copy of the DB, i going try the manual installation...

       
    • maximi89

      maximi89 - 2007-02-25

      i've the same problem, i use php4, i using it on a hosting, who can send me the copy of the DB, i going try the manual installation...

       
    • Nobody/Anonymous

      I had this problem, I fixed it by turning off open_base_dir. This stops the connection to a file which is outside the filestructure of your website, as such no connecting to DB.php.

      Possibly the developers need to include this as a test to make sure this restriction is turned off.

       
    • Nobody/Anonymous

      i'm using ubuntu and mysql5, installed the pear DB package and tried to start the configuration.
      When in press 'Test Database Connection' i recieve an empty popup.

      The odbc connection is working.

      Any tipps / hints ? (configuration files!?)

       
      • Nobody/Anonymous

        Does any other PEAR:DB package work?

         
    • Albert MW

      Albert MW - 2008-01-25

      Hi, I'm also had a problem with "DB Test Failure", but I got succeded to make it work!
      Here is my way.

      1) First, I rebuilt php (last 4 version) with the PEAR
         --with-pear=/usr/php/pear
      2) Then rebuilt Apache with the fresh libphp4.a
      3) So I saw that I didnt have the file DB.php in the PEAR dir (as it's written in phpBT docs),
         and I downloaded last version of PEAR:DB package from http://pear.php.net/package/DB/,
         extracted it and just copied it to my PEAR dir (/usr/php/pear in my case),
      4) I got DB.php here : /usr/php/pear/DB.php
      5) Then I manually corrected in install.php path PEAR_PATH as "/usr/php/pear/"
         (somewhere in 170 lines...)
      6) At last I added path to PEAR into php.ini
         include_path = ".:/usr/php/pear"
      7) Restart your Apache

      That's it! Everything works fine! :)

      Notes:
      1) I use FreeBSD 6.*
      2) and work with MySql 4.4.* version.

       
      • Nobody/Anonymous

        I just installed pear from my distribution (Redhat, SUSE, and Debian).  And was good to go.  You only need to mess with PEAR_PATH in the case where php does not already have pear in the path.

         
    • Nobody/Anonymous

      I have the same problem too.
      I have my own server and i use the WHM Cpanel and installed the PEAR,
      and then i set the correct path of the pear to mey install.php
      But it doesnt fix the problem.
      It said :
      DB Test Failure

      The installation script could not connect to the database roboform_phptest on the host localhost using the specified username and password.
      Please check these details are correct and that the database already exists then retry.

      DB Error: extension not found

       
      • Bryce Nesbitt

        Bryce Nesbitt - 2008-03-12

        If someone can dig up a PEAR database test utility, in php, I'll add it to phpBugTracker.  This is almost certainly a PEAR DB set up problem, nominally out of scope for phpBugTracker.

         
    • Spintz

      Spintz - 2008-03-24

      Please god stop using PEAR.

      Database access is not that hard and PEAR packages are an absolute nitemare.

       
      • Nobody/Anonymous

        yes, PLEASE run away!  I don't want evil package managers, I want a system where I know where everything is!  Pear even tells me that DB is deprecated.

         
    • Nobody/Anonymous

      Your php include path is: ".:/usr/local/lib/php"
      Error: Failed to load the PEAR DB.php module from the path. Check for the file "DB.php" in the path.

      Fatal error: Class 'DB' not found in /home/mydomain/domains/mydomain.nl/public_html/bugs/test.php on line 23

       
    • Bryce Nesbitt

      Bryce Nesbitt - 2008-08-24

      Use "PEAR_TEST.php" to solve all problems.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.