title: How to get the socket for MySQLi to Oracle DB connection?
body: <p>I am new with web development. I have difficulty in connecting to an oracle DB. This code was patterned from the <a href="http://www.oracle.com/technetwork/systems/articles/mysql-php1-139180.html" rel="nofollow">Oracle documentation</a>. </p>
  
  <p>I am sure with the connection details except the socket.Is the socket on default? or How do I get the socket detail from the Oracle DB interface? </p>
  
  <pre><code>$host="site.com";
  $port=1404;
  $socket="/tmp/mysql.sock";
  $user="admin";
  $password="admin123";
  $dbname="admin_table";
  
  /* create a connection object which is not connected */
  $conn = new mysqli();
  $conn -&gt; init();
  
  /* set connection options */
  $conn -&gt; options (MYSQLI_INIT_COMMAND, "SET AUTOCOMMIT=0");
  $conn -&gt; options (MYSQLI_OPT_CONNECT_TIMEOUT, 200);
  
  /* connect to MySQL server */
  $conn -&gt; real_connect ($host, $user, $password, $dbname, $port, $socket)
          or die ('Could not connect to the database server : ' . $conn -&gt; error . '\n');
  </code></pre>
  
  <p>I also encounter these errors:</p>
  
  <pre><code>Warning: mysqli::real_connect() [mysqli.real-connect]: MySQL server has gone away in C:\wamp\www\Lot_Verification\pages\DB_Connect.php on line 19
  
  Warning: mysqli::real_connect() [mysqli.real-connect]: Error while reading greeting packet. PID=6572 in C:\wamp\www\Lot_Verification\pages\DB_Connect.php on line 19
  
  Warning: mysqli::real_connect() [mysqli.real-connect]: (HY000/2006): MySQL server has gone away in C:\wamp\www\Lot_Verification\pages\DB_Connect.php on line 19
  
  Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp\www\Lot_Verification\pages\DB_Connect.php on line 20
  </code></pre>