note 120122 added to ref.com
| From: | SorinNegulescu | Date: | Sat, 05 Nov 2016 10:49:38 +0000 |
| Subject: | note 120122 added to ref.com | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-207018@lists.php.net to get a copy of this message | ||
I have spent a lot of hours trying to make word.application work on a Windows Server using Apache as
a service.
The application was working if Apache was started from command line (not as a service).
In the hope that this will help others not to lose hours of trying to solve this problem here is
what I found out:
- In php.ini make sure you have the following key under the [COM_DOT_NET]:
extension=php_com_dotnet.dll
- Apache shall run under a normal user account (not SYSTEM account). Run services.msc and fill-in
the info of the user under the Apache service's Properties tab.
- Make sure you are able to start MS Word normally under that user account and dismiss all the
dialogs that may appear (license, your info with initials, etc.). Start Word once again and make
sure no dialogs appear.
- Launch dcomcnfg.exe->Console Root->Component Services->Computers->My Computer->DCOM
Config->Microsoft Office Word 97 - 2003->Right Click(Properties)->Identity Tab and fill in
the same user account information as for Apache service.
- If you cannot find the Microsoft Office Word 97 - 2003, make sure you are launching the correct
DCOM Config (64 bit vs 32 bit) depending on what version of Office you have installed. To launch the
32 bit version run: mmc comexp.msc /32
Before following the steps described above, the winword.exe app appears in task manager but, if you
look at the memory consumption you can notice two things:
- it increases slowly
- it stops usually at about 7-8 MB.
Keywords: COM, word.application, Apache, service, winword, timeout, no error
----
Server IP: 72.52.91.14
Probable Submitter: 5.15.240.228
----
Manual Page -- http://php.net/manual/en/ref.com.php
Edit -- https://master.php.net/note/edit/120122
Del: integrated -- https://master.php.net/note/delete/120122/integrated
Del: useless -- https://master.php.net/note/delete/120122/useless
Del: bad code -- https://master.php.net/note/delete/120122/bad+code
Del: spam -- https://master.php.net/note/delete/120122/spam
Del: non-english -- https://master.php.net/note/delete/120122/non-english
Del: in docs -- https://master.php.net/note/delete/120122/in+docs
Del: other reasons-- https://master.php.net/note/delete/120122
Reject -- https://master.php.net/note/reject/120122
Search -- https://master.php.net/manage/user-notes.php