An error occurred while creating the OpenOfficecom component in php.

Source: Internet
Author: User
An error occurred while creating the OpenOfficecom component in php. 1. openoffice 3.4.1 was installed in win7.
2. start the command line: soffice-headless-accept = "socket, host = 127.0.0.1, port = 8100; urp;"-nofirststartwizard
3. view the task manager:

This indicates that the service is successfully started. However, if the service is run on user dell, dell is the administrator account on my computer.
4. php code:
   $osm = new COM("com.sun.star.ServiceManager") or die("Please be sure that OpenOffice.org is installed.n");

This sentence was a good one, and suddenly it was a bad day.
After running this sentence, an error occurs:
     Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `com.sun.star.ServiceManager' in E:\work\test\test.php on line 10( ! ) com_exception: in E:\work\test\test.php on line 10

View the task manager:

It indicates that the new com is successful, but it is not started by a dell user, but by a system user.
After the code is executed for a period of time, the above error occurs.

Question:
1. Why was it good? Will the com component call be unauthorized due to software conflicts or user group conflicts?
2. have you ever encountered this situation? How can this problem be solved?

Please try again !!


Reply to discussion (solution)

Are you sure you have no permissions?
Php is an anonymous user.

Are you sure you have no permissions?
Php is an anonymous user.



There was no problem before, the code was successfully reached the end, and the conversion was successful, during which there was no permission operation ~

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.