dongqiongjiong4740 2015-03-07 10:21 采纳率: 0%
浏览 106

来自PHP的exec但从cmd执行时DCOM权限错误正常工作(officetopdf.exe)

I want a php script to execute a command officetopdf.exe input.doc output.pdf where officetopdf.exe is an program that uses the installed Office to export office files to pdf.

When executed it throws the error:

‘Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied.’

and does not execute properly.

  • The server has IIS and Plesk panel. The user that calls PHP has been created with Plesk.
  • When officetopdf.exe is executed directly with cmd.exe it works well as expected.
  • It seems to be a problem of permissions of DCOM.
  • On local environment on our office in another computer with Windows 8 changing DCOM permissions it worked well.
  • On first install of office in the server all DCOM applications do not appear in DCOM config panel. I don't remember how we added but it wasn't automatically added because the Office was 32 bit and the system is 64 bit. If office 32 bit is installed the error 'Retrieving the COM class factory' changes to something like it does not find the class.
  • Tested on 2 servers with Windows 2012
  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?