I can connect to DB2 on the command line on the server.
db2=>connect to mytest user knellim using xxxx
Database Connection Information
Database server = Apache Derby CSS10050
SQL authorization ID = KNELLIM
Local database alias = MYTEST
When I connect to the same DB in PHP as cataloged or uncataloged, I get
this:
Connection to database failed.
SQLSTATE:
Message:
Below is my script
I followed this link http://www.db2ude.com/?q=node/81 to install ibm_db2 driver
I installed Apache using yum install httpd -y
Please suggest what can be the problem...
Thanks
db2=>connect to mytest user knellim using xxxx
Database Connection Information
Database server = Apache Derby CSS10050
SQL authorization ID = KNELLIM
Local database alias = MYTEST
When I connect to the same DB in PHP as cataloged or uncataloged, I get
this:
Connection to database failed.
SQLSTATE:
Message:
Below is my script
Code:
<?php
$database = 'mytest';
$user = 'knellim';
$password = 'xxxx';
$conn = db2_connect($database, $user, $password);
if ($conn) {
echo "Connection succeeded.";
db2_close($conn);
}
else {
echo "Connection failed.<p>";
echo 'SQLSTATE: ' . db2_conn_error() . '<br />';
echo 'Message: ' . db2_conn_errormsg(). '<br />';
}
?>
I installed Apache using yum install httpd -y
Please suggest what can be the problem...
Thanks
Comment