0

I want to write a PHP script that can retrieve information from UniData Database which is hosted on a different server.

I came across this script:

<?php
  $UdSession = new COM("UniObjects.unioaifctrl");
  $UdSession->HostName = "192.168.0.1";
  $UdSession->AccountPath = "c:\ibm\mydemoaccount";
  $UdSession->UserName = "admin";
  $UdSession->Password = "password";
  $UdSession->Connect();
?>

I downloaded asjava.zip from http://trac.spatialytics.com/geokettle/browser/trunk/libext/JDBC/asjava.zip?rev=1

and placed the unzipped folder in the root directory of my source code.

When I tried to run this php script, I encountered error as such: Failed to create COM object UniObjects.unioaifctrl

Please let me know how I can rectify the problem.

Additionally, my localhost is currently running on Windows. Eventually I wish to run the code on Mac OS. I heard about using UniObjects for Java. Where can I download this library and how do I incorporate this library in my code?

Thank you.

Don
  • 863
  • 1
  • 8
  • 22
Jia-Luo
  • 3,023
  • 5
  • 16
  • 17
  • Did you update the script you post with your actual data ? – Laurent S. Jun 25 '13 at 17:01
  • @Bartdude, yes I did. Error is brought up by $UdSession = new COM("UniObjects.unioaifctrl"); – Jia-Luo Jun 25 '13 at 17:03
  • 1
    If you wish to target OS X, then don't use COM, since that's only for Windows. If you can get UniObjects running on Java in both environments, then maybe something like the [PHP/Java Bridge](http://sourceforge.net/projects/php-java-bridge/) will help? A lot of research still required, I think. – halfer Jun 25 '13 at 17:04

0 Answers0