title: PHP DB2 connection error
body: <p>I having the following error to connect IBM DB2.</p>
  
  <pre><code>Connection failed.[unixODBC][Driver Manager]Data source name not found, and no default driver specified SQLCODE=0
  </code></pre>
  
  <p>and this is the configuration for db2 in my phpinfo.</p>
  
  <pre><code>IBM DB2, Cloudscape and Apache Derby support:   enabled
  Module release :    1.9.4
  Module revision :   $Revision: 327944 $
  Binary data mode (ibm_db2.binmode) :    DB2_BINARY
  DB2 instance name (ibm_db2.instance_name) ; no value
  </code></pre>
  
  <p>Plz help me to connect the database.</p>
  
  <p>The script is as below.</p>
  
  <pre><code>$database = 'dbT';
  $user = 'user';
  $password = 'pswd';
  $hostname = '10.250.10.11';
  $port = 456;
  
  
  $conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
    "HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
  $conn = db2_connect($conn_string, '', '');
  
  
  print $conn;
  
  if ($conn) {
      echo "Connection succeeded.";
      db2_close($conn);
  }
  else {
  print($conn);
      echo "Connection failed.";
      die(db2_conn_errormsg());
  }
  </code></pre>