Re: IIS and COM
| From: | Matthew Podwysocki | Date: | Fri, 18 Aug 2000 19:23:51 +0000 |
| Subject: | Re: IIS and COM | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1971@lists.php.net to get a copy of this message | ||
On my phpinfo function call, I look into
Directive Local Value Master Value allow_dcom Off Off typelib_file no value no valueI have found nothing in my php.ini that would seem to indicate COM settings. Is there something in that phpinfo that is of some use? I have tried the code you sent and I have the same message: Loaded word version (8.0b) Warning: Invoke() failed: No description available in \webroot\lib\comtest.php on line 21 It is the Documents->Add(); function that it seems to have a problem with. Thanks! Matt Podwysocki
From: Andy Hoffman <andy.hoffman@bms.com> To: Matthew Podwysocki <gcprweb@hotmail.com>, php-windows@lists.php.net Subject: Re: [PHP-WIN] IIS and COM Date: Fri, 18 Aug 2000 14:50:38 -0400 Andy Hoffman wrote: com_invoke($word, "Document.Add"); com_invoke($word,"Documents[1].SaveAs","Usless_test.doc"); Mind you, I've never tried these, it's just a guess. Basing this on BASIC information on php.net - the COM methods are not well documented. OK, I hate it when I'm wrong... but I was wrong. The "COM_invoke" method isn't working on my php4. Matthew, your code (with a properly installed php4) should work... try commenting out lines starting from the end of the script and work your way backwards... find out where the error is occuring. The following script executes on my machine (Apache/php4.0.2dev): <?php________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com$word = new COM("word.application"); print "Loaded word version ($word->Version)\n"; $word->Visible = 1;$res = $word->Documents->Add();?> Of course, this isn't working PERFECTLY... while I don't get any php errors, the winword process that get's launched never terminates :( (can't even manually kill the process in task list under nt) Anyone else have more experience with the COM code??? -- Andy Hoffman Web Developer Bristol-Myers Squibb office: LVL G1.2607 email: andy.hoffman@bms.com phone: 609-252-5788