Windows platform PHP error reporting Fatal error: Class COM not found in solution

  • 2020-05-12 06:31:49
  • OfStack

The IIS running php on Win Server 08 has improved a lot, but it still feels uncomfortable...

One day, when debugging the php production environment on an win, a section of php code returned an error:

Fatal error: Class 'COM' not found in XXXXXXXXX

The COM class was not found, and the php code was mainly used to call some system information. At first, I thought that php was not configured properly. I found the answer in stackoverflow, which was to discuss xampp.

Make sure you have the php_com_dotnet.dll file in the ext folder of the php root directory

★ php.ini is sure to have this statement


[PHP_COM_DOTNET]
extension=php_com_dotnet.dll

U start > run > services msc carriage returns > Make sure COM+ Event System services are enabled

It was built in before version 5.4.5 of PHP, but was separated in later versions...

Reprinted from ice cream pig 's Blog


Related articles: