Uncaught exception com_exception with message Failed to create COM object

Source: Internet
Author: User

Use the following code to call IE in PHP: Copy codeThe Code is as follows: browser = new COM ("InternetExplorer. Application ");

Failed to call normally. An error is reported directly:Copy codeThe Code is as follows: Fatal error: Uncaught exception 'com _ exception' with message 'failed' to create com object 'internetexplorer. application': access is denied.

The reason is that the COM component of IE prohibits normal account access by default. The solution is as follows:
1. Open Control Panel-Administrative Tools-component services
2. In the component service panel, choose console root directory> component service> Computer> my computer> DCOM configuration (for example)

3. Find Internet Explorer (Ver 1.0) in the right window, open the Properties window, and switch to the security label.

4. In the security label, select "Start and activate Permissions" and click "edit". Add the IIS account used by the website or add the Guests group to OK (for example ).

5. Restart IIS. Now you can call IE normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.