title: Connecting to Oracle 11gR2 XE on Ubuntu 13 server via PHP
body: <p>I am trying to connect to Oracle 11gR2 Xe on Ubuntu 13 server from another computer in the network, via PHP.
  I am using installs and examples followed from  <a href="http://php.net/manual/en/function.oci-connect.php" rel="nofollow">oci_connect</a> like here:</p>
  
  <pre><code>&lt;?php
  query_cities();
  function query_cities() {
  if {
  $c = oci_connect("hr", "hr", "localhost:1521/XE");
  ;
  } else {
  echo "No connection"; } 
  ?&gt;
  </code></pre>
  
  <p>or another example like:</p>
  
  <pre><code>$c = oci_connect("hr", "hr", "192.168.1.33:1521/XE");
  </code></pre>
  
  <p>I have already enabled the remote connection in DB via SqlPlus</p>
  
  <pre><code>SQL&gt; EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
  </code></pre>
  
  <p>and i have unlocked the user HR</p>
  
  <pre><code>SQL&gt; ALTER USER hr ACCOUNT UNLOCK;
  </code></pre>
  
  <p>but I can only find some connection via IPv6 on the network from SQL Developer, like netstat:</p>
  
  <p>tcp6  0  0 192.168.1.33:1521  192.168.1.2:57563  ESTABLISHED 14843/oracleXE</p>
  
  <p>tcp6  0  0 192.168.1.33:1521  192.168.1.2:59314  ESTABLISHED 15665/oracleXE</p>
  
  <p>not from my browser and they are not on tcp IPv4. The browser window remain white .. no reaction, unresponsive and no error message.
  Should this be due to the TNSLR IP is active only on IPv6 or non of the oci_connect formulas are good enough or I am missing some other else?</p>
  
  <p>I would appreciate any help on this issues</p>