title: A communication error has been detected PHP DB2 Connection
body: <p>I have tried to connect to DB2/AS400 remote database with db2cli odbc module and odbc_connect but returns the next error:</p>
  
  <blockquote>
    <p>Execution failed: [unixODBC][IBM][CLI Driver] SQL30081N A
    communication error has been detected. Communication protocol being
    used: "TCP/IP". Communication API being used: "SOCKETS". Location
    where the error was detected: "10.10.100.5". Communication function
    detecting the error: "recv". Protocol specific error code(s): "<em>",
    "</em>", "0". SQLSTATE=08001</p>
  </blockquote>
  
  <p>This is my PHP code:</p>
  
  <pre><code>&lt;?php
  
  $database = 'xxxx';
  $user = 'xxxx';
  $password = 'xxxx';
  $hostname = '10.10.100.5';
  $port = '55000';
  $driver = 'DB2';
  
  $conn_string = "DRIVER={$driver};DATABASE=$database;HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
  
  if (!$db = odbc_connect ($conn_string, $user, $password)) {
       print("Execution failed:\n");
  }
  
  else echo 'Success!';
  
  
  odbc_close($db);
  </code></pre>
  
  <p>Help me please!!</p>