title: Connect to OSI Pi database using PHP
body: <p>I am trying to connect to OSI Pi database and keeping getting the errors below. I have all the permissions set correctly because I can run VB code. It does read the server version correctly.</p>
  
  <p>Here is my PHP:</p>
  
  <pre><code> &lt;?php
   echo "I will connect to PI Server, read pisdk version and read server time";
   echo "&lt;br&gt;";
   $pisdkComObject = new COM("PISDK.PISDK") or die("Unable to instantiate PISDK object");
   echo "PI server version {$pisdkComObject-&gt;PISDKVersion}";
   $myServer = $pisdkComObject-&gt;Servers-&gt;Item("XXXX_SERVERNAME_XXXX");
   $myServer-&gt;Open();
   echo "&lt;br&gt;";
   echo "PI server time is {$myServer-&gt;ServerTime}";
   ?&gt;
  </code></pre>
  
  <p>Here is my output:</p>
  
  <p>PI server version 1.3.6 Fatal error: Uncaught exception 'com_exception' with message 'Source: pisdk.dll Description: Unable to open a session on a server. [-10728] PINET: Send Error.' in E:\XXXX.php:12 Stack trace: #0 E:XXXX.php(12): variant->Open() #1 {main} thrown in E:XXXX.php on line 12</p>