0

Yeah, this question is repeated, but, I swear to you that I read every single link on stackoverflow and google and I'm going crazy with this issue.

I tried a lot of things, I going to put some of them here. None of these worked.

My system:

  • Windows Server 2008
  • Using PHP with class COM to call an object that is not from the system, but from a desktop program called Sage Murano (LogicClass)
  • IIS (Internet Information Services)

My php, ubicated in C:\inetpub\wwwroot\blahblah\foo.php:

<?php 
ini_set("com.allow_dcom","true");
$conn = new COM("LogicControlOEM.OEM_EjecutaOEM") or die("Error");
?>

I've tried:

  1. https://stackoverflow.com/a/30242444/4315127

Find out the registers, their keys or whatever, and I gave permissions in all folders that contains "EjecutaOEM" to users:

  • Administrator
  • Everybody
  • Anonymous logon
  • IUSR_SERVIDOR (IIS)
  1. More permissions http://www.figured-it-out.com/figured-out.php?sid=24
  2. Then enable 32 bits on IIS https://help.webcontrolcenter.com/kb/a1114/how-to-enable-a-32-bit-application-pool-in-iis-7-dedicated-vps.aspx

Some ideas to try?

bey23
  • 313
  • 4
  • 16
  • So, to clarify, is the program on the same machine as the IIS and PHP or not? If it is on the same machine, have you written a simple VBScript program to verify you can create the object? Something like `set obj = CreateObject("LogicControlOEM.OEM_EjecutaOEM")` followed by `MsgBox TypeName(obj)` That is the first step to verify it is createable on the machine outside of the IIS and PHP processes. – Joseph Willcoxson May 24 '17 at 14:46
  • Yes, I did, but I didn't think it would work, it also gave me the same error, but now it did not return anything ... I have put the `MsgBox TypeName (obj)` that you told me and it returns the following: OEM_EjecutaOEM ... That's good, right? – bey23 May 24 '17 at 15:12
  • Yes, that's good. It verifies that the object can be created through COM on the target machine. Now the problem is clearly in the realm of PHP/IIS configuration. Does your simplified PHP script run ok if run from a command line and not invoked through IIS? You should be able to manually run php.exe with the script. Please see this related post: https://stackoverflow.com/questions/10678325/class-com-not-found – Joseph Willcoxson May 24 '17 at 15:29
  • @JoeWillcoxson Ok, also in the .vbs I wrote `obj.InicializaOEM 1, "XXX", "XXX", "", "XXX", "XXXXXX"` (this values are ok), and `res = obj.EjecutaOEM("LogicControlGenerP.GenFunctions", "_DC_Traspasos_Almacen")` and this return 0, it will be cause doesn't exists the function name? – bey23 May 24 '17 at 15:32
  • 1
    Can't help you with that problem. I know nothing about that specific component. – Joseph Willcoxson May 24 '17 at 16:00

0 Answers0