title: Warning: mysqli_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known
body: <p>This is db.php IM USING CLOUD9 as my host</p>
  
  <pre><code>function getDB() {
  $dbhost="paralphdigm-vtms-2622120";
  $dbuser="paralphdigm";
  $dbpass="";
  $dbname="vtms_db";
  $port = 3306;
  $dbConnection = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass); 
  $dbConnection-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  return $dbConnection;
  </code></pre>
  
  <p>}</p>
  
  <p>I edited my code to this now*</p>
  
  <p>Heres the error message
  Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Connection refused' in /home/ubuntu/workspace/db.php on line 8</p>