I am trying to get the properties of office documents on our web server. To do this, I want to use the DSOLEFILE.PropertyReader MS com component. I am using PHP 4, on IIS. However, when I try to execute the following code:
<?php
$prop = new COM("DSOLEFILE.PropertyReader") or die("Unable to instanciate Word");
?>
I get a nasty little message box stating:
"php.exe has generated errors and will be closed by windows. You will need to restart the program. An error log is being created."
I have checked that the object is installed on our web server, and have followed the article on this site on how to interface PHP with COM objects - http://www.phpbuilder.net/columns/venkatesan20030501.php3.
I was able to get the excel example to work. However, when I try to invoke the DSOLEFILE.PropertyReader I get the error message above. Here are my questions:
Where is the log mentioned in the error message?
I have tested the equivelent code in ASP and it works fine. Could the problem I am having be related to the fact that PHP runs as a CGI under IIS? If so, what are my options- run PHP under APACHE?, Configure IIS/PHP to run in ISAPI mode, etc.
I suspect this problem could be an authentication issue. I have tried both anonymous and digest authentication. Under anoymous authentication, the web page times out, with digest authentication I get the error outlined above. Is there a problem with using digest/kereros authentication with PHP running as a CGI?