ID: 32133 Updated by: [EMAIL PROTECTED] Reported By: fLAre_Dra_X at yahoo dot com -Status: Open +Status: Feedback Bug Type: COM related Operating System: Windows XP SP 2 PHP Version: 5.0.1 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-02-28 15:58:43] fLAre_Dra_X at yahoo dot com Description: ------------ I've download the version of PHP : http://snaps.php.net/win32/php5.0-win32-latest.zip It's work to call COM class, but when create object like word.application it failed. My configuration is disable all COM option on php.ini like com.allow_dcom. Is there any configuration that i need to do with my php or with my IIS ??? Reproduce code: --------------- <?php ini_set("com.allow_dcom","true"); // starting word $word = new COM("word.application") or die("Unable to instanciate Word"); print "Loaded Word, version {$word->Version}\n"; //bring it to front $word->Visible = 1; //open an empty document $word->Documents->Add(); //do some weird stuff $word->Selection->TypeText("This is a test..."); $word->Documents[1]->SaveAs("Useless test.doc"); //closing word $word->Quit(); //free the object $word->Release(); $word = null; ?> Expected result: ---------------- Com object of word. Actual result: -------------- PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `word.application': Access is denied. ' in E:\Inetpub\wwwroot\tutor\com_word.php:4 Stack trace: #0 E:\Inetpub\wwwroot\tutor\com_word.php(4): com->com('word.applicatio...') #1 {main} thrown in E:\Inetpub\wwwroot\tutor\com_word.php on line 4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32133&edit=1