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 "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, fix the error.