title: Call to undefined function ocilogon() - IIS 7.5 - Windows 2008 R2 x64 - PHP 7.2.7
body: <p>I am migrating a website from a development environment (Angular 4 - WAMP Server - PHP 5.6.35) to a production environment.  In development, the Angular 4 application was successfully able to connect to a PHP script and run an Oracle stored procedure so there are no issues with the code.</p>
  
  <p>In production, I've had to install PHP using the Web Platform Installer to successfully run a PHP site with phpinfo() showing 'PHP Version 7.2.7'.  I run the application and when it attempts to run the PHP script, I get a 500 Internal Server error when the script is run.  PHP error logs show:</p>
  
  <pre><code>&lt;b&gt;Fatal error&lt;/b&gt;:  Call to undefined function ocilogon() in &lt;b&gt;C:\inetpub\wwwroot\app\assets\scripts\php\pullData.php&lt;/b&gt; on line &lt;b&gt;154&lt;/b&gt;&lt;br /&gt;
  </code></pre>
  
  <p>Research has indicated that the issue could be:</p>
  
  <ol>
  <li>Possible IIS configuration issue</li>
  <li>Oracle Instant Client issue</li>
  <li>OCI8 PHP Library not enabled</li>
  </ol>
  
  <p>I think I've ruled out the IIS configuration as the front-end connects to PHP and runs the scripts without issue.</p>
  
  <p>Oracle Instant Client 12.1 is installed and other applications can connect to Oracle.  The PATH environment variable appears correctly set.  I don't know if it is a 32-bit or 64-bit version - or whether this makes a difference.</p>
  
  <p>I think this is the issue - the OCI8 library isn't enabled correctly.  On the dev server, I was able to modify the php.ini file to uncomment (and enable) the dll, and phpinfo() showed the OCI8 library in the list:</p>
  
  <pre><code>extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client
  </code></pre>
  
  <p>On production, I've had to manually add the 'extension=php_oci8_12c.dll' line (it wasn't uncommented out) and I've checked the EXT folder of PHP and the dll exists there.  Phpinfo() still doesn't show the OCI8 library enabled.</p>