title: VBScript isn't working on php, but VBScript itself works fine
body: <p>I have a VBScript and trying to call the VBScript from PHP 
  I tried to use system(), exec() so on.. </p>
  
  <p>but noticed that the VBScript itself is working absolutely fine.
  I am sure that my VBScript is correct as itself works fine..
  I dont know why it doesnt work when I call it from php.</p>
  
  <p>I enabled extension=php_com_dotnet.dll from php.ini as well.. 
  Could anyone help me please? 
  Thanks</p>
  
  <p>Below is my VBScript</p>
  
  <pre><code>Dim cn, rs
  
  set cn = CreateObject("ADODB.Connection")
  connectionString = "Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=testDB;UID=root; Password='root';"
  cn.Open connectionString
  
  set rs = CreateObject("ADODB.recordset")
  
  
  studyid =1
  'Sql= "INSERT INTO shrinkage (studyName, anch1, anch2, anch3, node1, node2, distanceB, distanceA) VALUES ('" &amp; studyName &amp;"', '" &amp; anch1 &amp; "' , '" &amp; anch2 &amp; "' , '" &amp; anch3 &amp; "' , '" &amp; node1 &amp; "' , '" &amp; node2 &amp; "' , '" &amp; distanceB &amp; "' , '" &amp; distanceA &amp; "')"
  Sql= "SELECT p.studyid, anchor, nodeD, s.study, s.testid FROM parameters p INNER JOIN study s on p.studyid = s.studyid WHERE p.studyid = " &amp; studyid 
  
  Set rs = cn.Execute(Sql)
  
  Do While not rs.EOF
  
      studyid = rs(0) 
      anchor = rs(1)
      anchorSet = Split(anchor, " ")  
      anchor1 = anchorSet(0)
      anchor2 = anchorSet(1)
      anchor3 = anchorSet(2)  
      study = rs(3)
      runType = rs(4)
  
      ' if runType is deflection loop, then we only need one node value
      If runType = 1 Then
          node = rs(2)
  
      ' if runType is shrinkage loop, then we need two node values.   
      ElseIf runType = 2 Then
          node = rs(2)
          nodeSet = Split(node, " ")
          node1 = nodeSet(0)
          node2 = nodeSet(1)
      End If
  
  
      rs.MoveNext
  Loop
  
  cn.close
  
  MsgBox  "End of program"
  </code></pre>