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 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器