Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010
    Posts
    4

    Unanswered: how connect DB2 With PHP... Fatal Error try Connect.

    hi, i install the pecl extensions of ibm_db2 in my php, but give me fatla error on run my page.

    this is the error:
    Fatal error: Call to undefined function db2_connect() in C:\AppServ\www\multivpos\configs\bd.php on line 7

    i copy the php_ibm_db2.dll in my folder php, C:\AppServ\php5\ext, and i configure the php.ini file, adding line "extension=php_ibm_db2.dll" in php.ini

    my php file to connect:
    PHP Code:
    <?php
    $database 
    'SAMPLE';
    $user 'db2admin';
    $password 'apassword';
    $hostname 'localhost';
    $port 50000;
    $connection db2_connect($database$user$password);
    if (
    $connection)
    {
    echo 
    "Connection succeeded."."\n";
    }
    else
    {
    echo 
    "Connection failed.<br />";
    echo 
    'SQLSTATE : ' db2_conn_error() . '<br/>';
    echo 
    'Message : ' .db2_conn_errormsg(). '<br />';
    }
    please help me ¿how connect?, ¿how fix the error?.

  2. #2
    Join Date
    Jul 2010
    Location
    Winnipeg, Canada
    Posts
    7
    The extension isn't properly installed. If you're using IIS, see PHP: Installation - Manual for additional instructions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •