0

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.

2
  • 3
    Did you enable COM in php.ini? Commented Apr 21, 2013 at 14:56
  • Yes that was the problem. Thank you. I knew it was something stupid like that, just didn't know how to fix it. Commented Apr 21, 2013 at 15:02

1 Answer 1

2

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 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.