Since COM components can only be used on Windows, the program must be run on Windows server. There was no problem in building and installing the local XP system. I encountered N problems on the server win2003. In the end, the gump classmate took action to solve it. It took no less than 10 hours to complete it.
After installing the latest version of Wps office personal version 12012, it is logically completed, but the error reported on the server by running the program is as follows:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `': Access denied. ' in D:\www\\:12 Stack trace: #0 D:\www\\(12): com->com('') #1 {main} thrown in D:\www\\ on line 12
If you run this sentence, $wps = new COM(""); will report an error. After searching, I made configuration in the DCOM configuration and solved this prompt.
1. Open Control Panel - Administrative Tools - Component Services
2. Open the Console Root Directory in the Component Service Panel - Component Services - Computer - My Computer - DCOM Configuration
3. Find Kingsoft Writer Application Class (Kingsoft's Document Application Service), open the properties window, and switch to the security tab. Select "Start and Activate Permissions" to customize, edit, and add everyone permissions. The same is true for "access permissions".
This error prompt passes, and an error occurred when running to $doc = $wps->Documents->Open($src_filename);
Fatal error: Uncaught exception 'com_exception' with message 'Error [0x800706be] The remote procedure call failed. ' in D:\www\\:15 Stack trace: #0 D:\www\\(15): variant->Open('d:\www\...') #1 {main} thrown in D:\www\\ on line 15
In the "Identity" tab, changing the startup user to an interactive user, another error message appears:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `': The system cannot start the server process because the configuration type is incorrect. Please check the username and password. ' in D:\www\\:15 Stack trace: #0 D:\www\\(15): com->com('') #1 {main} thrown in D:\www\\ on line 15
Trying repeatedly will not work, including reinstalling WPS.
After the "Identification" tag, use the specified user to run, and first use the user used on the website to run, but it cannot be passed. Then use the administrator account to run, and an error message will pop up when clicking OK. It should be that neither these two options (start user or specified user) can start this com component. If you use an interactive user, it is OK, but it prompts that the username and password are incorrect: (
After the test sometimes runs for a long time, no errors are reported... and the following errors have also occurred:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `': Server failed to run ' in D:\www\\:30 Stack trace: #0 D:\www\\(30): com->com('') #1 {main} thrown in D:\www\\ on line 30
During this period, it was also found that since the execution to $wps->Documents->Open is stopped, a wps or wpsupdate process will appear in the process, and one will appear every time you refresh. At most, more than 30 such processes are found at a time, which sometimes affects the program and needs to be deleted one by one by one by one.
Finally, I used a very BT method to run the IIS authentication method of this site using the administrator administrator account, and it was so good! . . .
After installing the latest version of Wps office personal version 12012, it is logically completed, but the error reported on the server by running the program is as follows:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `': Access denied. ' in D:\www\\:12 Stack trace: #0 D:\www\\(12): com->com('') #1 {main} thrown in D:\www\\ on line 12
If you run this sentence, $wps = new COM(""); will report an error. After searching, I made configuration in the DCOM configuration and solved this prompt.
1. Open Control Panel - Administrative Tools - Component Services
2. Open the Console Root Directory in the Component Service Panel - Component Services - Computer - My Computer - DCOM Configuration
3. Find Kingsoft Writer Application Class (Kingsoft's Document Application Service), open the properties window, and switch to the security tab. Select "Start and Activate Permissions" to customize, edit, and add everyone permissions. The same is true for "access permissions".
This error prompt passes, and an error occurred when running to $doc = $wps->Documents->Open($src_filename);
Fatal error: Uncaught exception 'com_exception' with message 'Error [0x800706be] The remote procedure call failed. ' in D:\www\\:15 Stack trace: #0 D:\www\\(15): variant->Open('d:\www\...') #1 {main} thrown in D:\www\\ on line 15
In the "Identity" tab, changing the startup user to an interactive user, another error message appears:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `': The system cannot start the server process because the configuration type is incorrect. Please check the username and password. ' in D:\www\\:15 Stack trace: #0 D:\www\\(15): com->com('') #1 {main} thrown in D:\www\\ on line 15
Trying repeatedly will not work, including reinstalling WPS.
After the "Identification" tag, use the specified user to run, and first use the user used on the website to run, but it cannot be passed. Then use the administrator account to run, and an error message will pop up when clicking OK. It should be that neither these two options (start user or specified user) can start this com component. If you use an interactive user, it is OK, but it prompts that the username and password are incorrect: (
After the test sometimes runs for a long time, no errors are reported... and the following errors have also occurred:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `': Server failed to run ' in D:\www\\:30 Stack trace: #0 D:\www\\(30): com->com('') #1 {main} thrown in D:\www\\ on line 30
During this period, it was also found that since the execution to $wps->Documents->Open is stopped, a wps or wpsupdate process will appear in the process, and one will appear every time you refresh. At most, more than 30 such processes are found at a time, which sometimes affects the program and needs to be deleted one by one by one by one.
Finally, I used a very BT method to run the IIS authentication method of this site using the administrator administrator account, and it was so good! . . .