PHP - COM does not work in IIS

旧街凉风 提交于 2019-12-13 05:53:15

问题


I'm having an issue trying to get COM to work on my local iis server running php. This is related to an earlier post but now i am finding COM just simply does not load anything.

I've tried this... new COM( 'ADODB.Connection' )

I've also tried this... new COM("WScript.Shell")

both of these lines of code will not work. They do not throw errors, just simply die and do not execute any further in the code. I've tried catching an exception in a try-Catch but nothing gets returned. I'm guessing that there is something wrong with COM but have never used it before so I don't know where to look to fix it or enable it. Any help is appreciated. Thanks.


回答1:


From the installation page;

As of PHP 5.3.15 / 5.4.5, this extension requires php_com_dotnet.dll to be enabled inside of php.ini in order to use these functions. Previous versions of PHP enabled these extensions by default.

Since you're running 5.3.19, you'll need to enable it in php.ini using something like;

[COM_DOT_NET] 
extension=php_com_dotnet.dll 


来源:https://stackoverflow.com/questions/16132340/php-com-does-not-work-in-iis

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!