Guessing I would suggest that you examine the permissions on the file referenced by $DocumentPath and see if IUSR_<MACHINE> has read permssion. If not, either run the site as a user with permission or grant the IUSR read permission on the document.
Alan. ----- Original Message ----- From: "RS Herhuth" <[EMAIL PROTECTED]> To: "Php-Windows@Lists. Php. Net" <[EMAIL PROTECTED]> Sent: Thursday, May 24, 2001 16:54 Subject: [PHP-WIN] IIS COM problem > > I just switched over from Apache to IIS and followed the installation and > configuration instructions to the letter. My php test pages work fine and > everything seems to be in order except that my pages that use COM > functionality now generate the error below. > > > CODE ----------- > > <?php > > // convert a Word doc to an HTML file > $DocumentPath = str_replace("\\\\", "\\", $_GET["DocumentPath"]); > > // THIS IS THE LINE THAT GENERATES THE ERROR > $word = new COM("word.application") or die("Unable to instantiate > application object"); > > // creating an instance of the Word Document object > $wordDocument = new COM("word.document") or die("Unable to instantiate > document object"); > > // open up an empty document > $wordDocument = $word->Documents->Open($DocumentPath); > > // create the filename for the HTML version > $HTMLPath = substr_replace($DocumentPath, 'html', -3, 3); > > // save the document as HTML > $wordDocument->SaveAs($HTMLPath, 8); > > // clean up > $wordDocument = null; > $word->Quit(); > $word = null; > > echo "<a href='$HTMLPath'>load...</a>"; > > ?> > > > > ERROR --------------- > > Warning: Unable to obtain IDispatch interface for CLSID > {000209FF-0000-0000-C000-000000000046}: Access is denied. in > c:\inetpub\wwwroot\COM\htmlviewer.php on line 9 > > > > > This worked fine under Apache. > > Thanks, > Ron > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php