title: PHP: Unknown MySQL server host with mysqli
body: <p>I have the following code:</p>
  
  <pre><code>$username = 'username';
  $password = 'password';
  $host = 'localhost';
  $db = 'dbname';
  $dbh = new mysqli('p:'.$host, $username, $password, $db) 
      or die('no connection to server');
  </code></pre>
  
  <p>But I get the following error</p>
  
  <pre><code>PHP Warning:  mysqli::mysqli() [&lt;a href='function.mysqli-mysqli'&gt;function.mysqli-mysqli&lt;/a&gt;]: (HY000/2005): Unknown MySQL server host 'p:localhost' (1) in /var/www/vhosts/politiker.lu/httpdocs/includes/sql.php on line 8
  </code></pre>
  
  <p>This intrigues me because the very same code worked on my development environment. Now that I want to set it up on my production server, it does not work. Any ideas?</p>
  
  <p>Note: I am not very good with servers, so excuse me if the error should be something trivial.</p>
  
  <h3>EDIT 1</h3>
  
  <p>Here are the versions:
  Development PHP (5.3.3-1ubuntu9.1) + MySQL(5.1.49-1ubuntu8.1)<br>
  Production PHP (5.2.4-2ubuntu5.12) + MySQL(5.0.51a)</p>