php建立OpenOffice com組件失敗

來源:互聯網
上載者:User
1、win7下安裝完openoffice 3.4.1
2、命令列啟動:soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
3、查看工作管理員:

說明服務成功啟動;但是以使用者dell啟動並執行,dell是我電腦上的管理員帳號
4、php代碼:
   $osm = new COM("com.sun.star.ServiceManager") or die("Please be sure that OpenOffice.org is installed.n");

這一句之前是好的,突然哪一天就不好使了。
運行這句後,出現錯誤:
     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

此時查看工作管理員:

說明new 這個com是成功的,但不是以dell使用者啟動的,而是以system使用者啟動的。
代碼執行一段時間後,便會出現以上錯誤。

疑問之處:
1、為什麼之前是好的?會不會由於軟體衝突或使用者組衝突引起的調用com組件無許可權?
2、各位有沒有遇到過這種情況?該如何解決?

請解惑!!


回複討論(解決方案)

你考慮到是否是沒有許可權呢?
php 可是匿名使用者啊

你考慮到是否是沒有許可權呢?
php 可是匿名使用者啊



之前是沒有問題的,代碼成功走到最後,並轉換成功,期間沒有任何許可權方面的操作~
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.