繁体   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