I have a following code which works fine in PHP 5.4.4:
if (@class_exists('COM'))
{
// Do the actual work here...
}
else
{
throw new MissingComponentException('COM');
}
Once upgraded to PHP 5.4.5, the code stops working, and is always throwing the exception. Other answers on Stack Overflow are not helpful, since they are referring to PHP running on a platform other than Windows (example; another one).
What can I do?
In previous versions of PHP, COM was embedded. Starting from PHP 5.4.5, there is a new extension called php_com_dotnet.dll
. In order to continue to use COM, add the following line to php.ini
:
extension=php_com_dotnet.dll
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With