I need to use php’s COM object functionality to work with other applications. I’ll be working with an app created internally at work, but I figured I’d make sure I could get up and running with COM by trying to open word, excel, ie, etc (all of which are installed on my machine).
When i attempt to open any of these apps, I get this error:
PHP Fatal error: Uncaught exception 'com_exception'
with message 'Failed to create COM object
`InternetExplorer.Application': Access is denied. ' in
C:\\Inetpub\\wwwroot\\word.php:4 Stack trace: #0
C:\\Inetpub\\wwwroot\\word.php(4):
com->com('InternetExplore...') #1 {main} thrown in
C:\\Inetpub\\wwwroot\\word.php on line 4
Here is sample code:
<?php
$ie = new COM("InternetExplorer.Application");
$ie->Navigate2("about:blank");
$ie->Visible = true;
?>
I’m running Windows XP with iis5.1 and php5.2.1 (as cgi)
(phpinfo() output attached as pdf)
The php manual states
You are responsible for installing support for the various COM objects that you intend to use (such as MS Word); we don’t and can’t bundle all of those with PHP.
…which would seem to imply that i need to “install support for the various COM objects I intend to use”… but I’m not sure where to go for this.
So how can I get “support for the various COM objects”?
What com-related php.ini settings are required?
Are there permission issues that need to be addressed?
thanks!