title: PHP Connection with DB2 in Windows running Apache Server
body: <pre><code>$hostname = "localhost";
  $database = "RUTHLESS";
  $user = "ruthless";
  $password = "guessit123";
  
  $conn_string = "DRIVER={IBM DB2 ODBC DRIVER - DB2COPY1};HOSTNAME=$hostname;PROTOCOL=TCPIP;UID=$user;PWD=$password;DATABASE=$database;";
  
  $conn = db2_connect($database, $user, $password);
  
  if ($conn) {
     echo "Success";
     db2_close($conn);
  } else {
     echo "failed ".db2_conn_errormsg();
  }
  </code></pre>
  
  <p>The above program does not display anything on the browser window??? The code seems to be stuck on db2_connect() function.</p>