Hi,
I am a PHP developer having following query,
I have installed latest XAMPP having PHP 5.4 on windows 7. I am looking to
use OCX file using PHP, I successfully registered it using regsvr32
command. At the same time following settings are enabled in php.ini file
extension=php_com_dotnet.dll
com.allow_dcom = true
com.autoregister_typelib = true
com.autoregister_casesensitive = false
com.autoregister_verbose = true
Follwing php code I am using to use it.
$moo = new COM("Ranger.ocx");
Getting error as
Fatal error: Uncaught exception 'com_exception' with message 'Failed to
create COM object `Ranger.ocx': Invalid syntax ' in
D:\xampp\htdocs\com\index.php:9 Stack trace: #0
D:\xampp\htdocs\com\index.php(9): com->com('Ranger.ocx') #1 {main} thrown
in D:\xampp\htdocs\com\index.php on line 9
Secondly I used following code
$obj = new COM("CLSID:1C5C9093-05A8-11D4-9AF9-00104B23E2B1");
$obj->GetTransportStateString();
But got error as :
Error msg: Failed to create COM object
`CLSID:1C5C9093-05A8-11D4-9AF9-00104B23E2B1': The specified module could
not be found.
Then I used following query
$obj = new COM("1C5C9094-05A8-11D4-9AF9-00104B23E2B1");
$obj->GetTransportStateString();
Got error as
Error msg: Failed to create COM object
`1C5C9094-05A8-11D4-9AF9-00104B23E2B1': Invalid syntax
Please provide valid solution to resolve this issue. Feedback appreciated.
Thanks & Regards,
Rajendra Mahajan