簡體   English   中英

致命錯誤:在…PHP5.3,Apache2.2,Windows Server 2008中找不到類“ COM”

[英]Fatal error: Class 'COM' not found in… PHP5.3, Apache2.2, Windows server 2008

另一個讓我發瘋的問題。 這似乎是一個常見錯誤,我無法使用“傳統”方法(其他人針對同一問題提供的答案)解決。

Windows 2008 R2-x64

阿帕奇2.2.25

PHP 5.3.27

我的php.ini中有以下幾行:

extension_dir = "C:\Program Files (x86)\PHP\ext\"
[COM_DOT_NET]
extension=php_com_dotnet.dll

php_com_dotnet.dll存在於該目錄中,我什至更進一步,嘗試為PHP文件夾分配“所有人”讀取權限,盡管它應該可以正常訪問,因為它確實在其中加載了其他庫。

下面是來自phpinfo()的configure命令,這實際上是唯一提及COM的內容。

cscript / nologo configure.js“ --enable-snapshot-build”“ --disable-isapi”“ --enable-debug-pack”“ --without-mssql”“ --without-pdo-mssql”“-沒有-pi3web“”“ --with-pdo-oci = C:\\ php-sdk \\ oracle \\ instantclient10 \\ sdk,共享”“” --with-oci8 = C:\\ php-sdk \\ oracle \\ instantclient10 \\ sdk,共享“ “ --with-oci8-11g = C:\\ php-sdk \\ oracle \\ instantclient11 \\ sdk,共享”“ --enable-object-out-dir = .. / obj /” “ --enable-com-dotnet =共享“ ” --with-mcrypt = static“” --disable-static-analyze“

任何建議,不勝感激! 謝謝

編輯

get_cfg_var('cfg_file_path') = C:\Program Files (x86)\PHP\php.ini

我編輯的是php.ini。

另外,這是錯誤日志,沒有任何東西指向問題。

[Mon Mar 31 14:51:09 2014] [notice] Apache/2.2.25 (Win32) PHP/5.3.27 mod_aspdotnet/2.2 configured -- resuming normal operations

[Mon Mar 31 14:51:09 2014] [notice] Server built: Jul 10 2013 01:52:12

[Mon Mar 31 14:51:09 2014] [notice] Parent: Created child process 3708

[Mon Mar 31 14:51:09 2014] [notice] mod_aspdotnet: CorBindToRuntimeEx has loaded version v2.0.50727 of the .NET CLR engine.

[Mon Mar 31 14:51:40 2014] [notice] Child 3708: Child process is running

[Mon Mar 31 14:51:40 2014] [notice] Child 3708: Acquired the start mutex.

[Mon Mar 31 14:51:40 2014] [notice] Child 3708: Starting 250 worker threads.

[Mon Mar 31 14:51:40 2014] [notice] Child 3708: Starting thread to listen on port 8086.

[Mon Mar 31 14:51:40 2014] [notice] Child 3708: Starting thread to listen on port 8084.

沒有答案-只是試圖獲取更多數據
什么是輸出

<?php
$config = file(get_cfg_var('cfg_file_path'));
foreach( $config as $n=>$l) {
    if ( false!==strpos($l, 'dotnet') ) {
        printf("%03d %s<br />\r\n", $n, $l);
    }
}
echo 'com_dotnet: ', extension_loaded('com_dotnet') ? 'yes':'no', "<br />\r\n";
echo 'class: ', class_exists('COM')  ? 'yes':'no', "<br />\r\n";

更新:(評論的答案)

答案似乎是損壞的或不正確的php_com_dotnet.dll,而Windows安裝程序並未替換該文件。 我只是抓住了匹配版本的二進制zip,用手覆蓋了dll-VOILA! 將您的答案標記為答案,因為它是最接近的答案,並讓我走上了正確的軌道。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM