Uncaught exception com_exception with message Failed to create COM object

WBOY
Release: 2016-07-29 08:47:43
Original
1235 people have browsed it

Use the following code to call IE in PHP:

Copy code The code is as follows:


browser = new COM("InternetExplorer.Application");


cannot be called normally and an error is reported directly:

Copy Code The code is as follows:


Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `InternetExplorer.Application': Access denied.


The reason is that the COM component of IE prohibits access by ordinary accounts by default. The solution is as follows:
1. Open the Control Panel - Management Tools - Component Services
2. Open the console root directory - Component Services - Computer in the Component Services panel. - My Computer - DCOM configuration (as shown below)
 Uncaught exception com_exception with message Failed to create COM object
3. Find Internet Explorer (Ver 1.0) in the right window, open the properties window, switch to the Security tab
4. Select Customize for "Startup and Activation Permissions" in the Security tab , edit, add the IIS account used by the website or add the Guests group and confirm (as shown below).
 Uncaught exception com_exception with message Failed to create COM object
5. Restart IIS and you should be able to call IE normally now.

The above introduces Uncaught exception com_exception with message Failed to create COM object, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template