title: How to connect to Oracle Database with php?
body: <p>I am currently working on a website that connects to an Oracle Database. I have two php files, one for connection with the database and the other is the html structure itself.</p>
  
  <p>Connect.php: </p>
  
  <pre><code>&lt;?php
  
  $servername = "//////";
  $username = "/////";
  $password = "/////";
  
  $conn = oci_connect($servername, $username, $password);
  
   if ($conn-&gt;connect_error) {
     die("Connection failed: " . $conn-&gt;connect_error);
   }
   echo "Connected!";
  
  ?&gt;
  </code></pre>
  
  <p>I have been having a very hard time connecting to the database. I followed the Oracle tutorial and edited the oci8.connection_class = MYPHPAPP in php.ini, but everytime I run the Connect.php, I get the HTTP Error 500. Did I miss anything? What should I do?</p>
  
  <p>Edit 1: I used display_errors and the error I am getting is Call to undefined function oci_connect()</p>
  
  <p>Edit 2: I tried everything at this point to make the oci_connect work. I downloaded the oracle client and made it an environmental variable but oci_connect is still not working. I would really appreciate if any mac users could help me with this.</p>