简体   繁体   English

致命错误:在…PHP5.3,Apache2.2,Windows Server 2008中找不到类“ COM”

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

Another issue that is driving me absolutely nuts. 另一个让我发疯的问题。 This seems to be a common error that I have not been able to fix with "traditional" methods (answers provided by others for the same issue).. 这似乎是一个常见错误,我无法使用“传统”方法(其他人针对同一问题提供的答案)解决。

Windows 2008 R2 - x64 Windows 2008 R2-x64

Apache 2.2.25 阿帕奇2.2.25

PHP 5.3.27 PHP 5.3.27

I have these lines in my php.ini: 我的php.ini中有以下几行:

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

php_com_dotnet.dll exists in that directory, I even took it one step further and tried assigning read permission to Everyone for the PHP folder although it should have access just fine as it does load other libraries in there. php_com_dotnet.dll存在于该目录中,我什至更进一步,尝试为PHP文件夹分配“所有人”读取权限,尽管它应该可以正常访问,因为它确实在其中加载了其他库。

Below is the configure command from phpinfo() which is really the only thing mentioning COM. 下面是来自phpinfo()的configure命令,这实际上是唯一提及COM的内容。

cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\\php-sdk\\oracle\\instantclient10\\sdk,shared" "--with-oci8=C:\\php-sdk\\oracle\\instantclient10\\sdk,shared" "--with-oci8-11g=C:\\php-sdk\\oracle\\instantclient11\\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" 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“

Any suggestions are greatly appreciated! 任何建议,不胜感激! Thanks 谢谢

EDIT 编辑

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

Which is the php.ini I have edited. 我编辑的是php.ini。

Also, here is the error log, nothing pointing to an issue.... 另外,这是错误日志,没有任何东西指向问题。

[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.

Not an answer - just trying to get more data 没有答案-只是试图获取更多数据
What's the output of 什么是输出

<?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";

?

UPDATE: (answer from comments) 更新:(评论的答案)

The answer seemed to be a corrupt or somehow "bad" php_com_dotnet.dll, which the windows installer did not replace. 答案似乎是损坏的或不正确的php_com_dotnet.dll,而Windows安装程序并未替换该文件。 I simply grabbed the matching version binary zip, overwrote the dll by hand - VOILA! 我只是抓住了匹配版本的二进制zip,用手覆盖了dll-VOILA! Marking your answer as the answer since it was the closest and got me on the right track. 将您的答案标记为答案,因为它是最接近的答案,并让我走上了正确的轨道。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Apache2.2-PHP5.3-MySQL5.5-MantisBT - Apache2.2 - PHP5.3 - MySQL5.5 - MantisBT 致命错误:在C:\\\\ Apache Software Foundation \\ Apache2.2 \\ htdocs \\ sample \\ testdb.php中找不到类&#39;Mongo&#39; - Fatal error: Class 'Mongo' not found in C:\\Apache Software Foundation\Apache2.2\htdocs\sample\testdb.php Windows Apache2.2 PHP5 PHPMailer错误 - Windows Apache2.2 PHP5 PHPMailer Error 致命错误:在PHP 5.4.16,Windows8,Apache中找不到类&#39;COM&#39; - Fatal error: Class 'COM' not found in PHP 5.4.16, Windows8, Apache 致命错误:在Win Server 2008 R2中找不到类“ COM”的PHP - Fatal error: Class 'COM' not found PHP in Win Server 2008 R2 找不到Apache2.2 Zend server6配置“ ites.d / globals-*。conf”错误 - Apache2.2 Zend server6 configuration “ites.d/globals-*.conf” was not found" error 在 Apache 2.2 上使用 FatFree 和 PHP5.3 时无法呈现简单页面 - Can't render a simple page when using FatFree and PHP5.3 on Apache 2.2 Apache错误-在Windows 2008 R2 Server上的Apache 2.2中安装PHP 5.5.7 - Apache Error - Installing PHP 5.5.7 in Apache 2.2 on Windows 2008 R2 Server 致命错误:在PHP 5.6中找不到类&#39;COM&#39; - Fatal error: Class 'COM' not found in php 5.6 在 Win Server 2008 上为 php5.2/5.3 模块配置 apache 2.2 - configuring apache 2.2 for php5.2/5.3 module on Win Server 2008
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM