Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: jumbie on August 15, 2010, 07:39:52 pm
-
I want to create object EA.Repository from PHP with “new COM” syntax:
$rep = new COM("EA.Repository");
No success = no answer from browser.
The same problem with command:
com_load_typelib("EA.Repository");
I have local web server on the same machine as EA. The other COM objects like “ADO.Connection” are working well.
Is it possible to connect EA from PHP and how? Thanks for answers!
-
I suspect your problem that whatever user your PHP script is running under doesn't have license details set up for EA.
-
Thanks for answer, but without solution.
The script in VBS file on my machine
Set rep = CreateObject("EA.Repository")
rep.Openfile("C:\eatemp\test.eap")
Msgbox rep.models.count
rep.ShowWindow 1
msgbox "Opened"
is working good.
I have my intranet local web server installed on the same machine as EA. If the problem is in license details, how can I solve this problem and create object in PHP?
Is it possible?
Thanks for answers!
-
Well, I connect from Perl and that works like a charm. Maybe you fiddle around a bit with the COM call and try to open "easier" objects like notepad. Can't really help further since my PHP background is all Linux.
b.
-
beginner, thanks, but as I said, the other COM objects like “ADO.Connection” are working well... :)
-
Hmm. The ability to read brings an obvious advantage.
Now, as said my background in PHP is Linux, where it could be a security problem. Don't know what Windoze is like.
b.
-
As I said, your PHP code will likely be running under a different user from the one you log in to. That user will not have license details set up, so the COM object will not be able to create. When you run vbscript you are still running as the same user.