This article will introduce to you the solution to the Fatal error: Class 'COM' not found in PHP error on the Windows platform. Friends who need to know more can refer to it.
Although the performance of running PHP on IIS installed on Win Server 08 has improved a lot, I still feel uncomfortable. . .
One day while debugging a PHP production environment on Win, a piece of PHP code returned an error:
Fatal error: Class 'COM' not found in XXXXXXXXX
1 Fatal error: Class 'COM' not found in XXXXXXXXX
No COM class was found. The PHP code mainly calls some system information. At first I thought that PHP was not configured properly. I found the answer on stackoverflow. It was about xampp. To extend it, I added a few points:
★ Make sure the file php_com_dotnet.dll exists in the ext folder of the php root directory
★ php.ini Make sure to have this statement
[PHP_COM_DOTNET]
extension=php_com_dotnet.dll
1
2 [PHP_COM_DOTNET]extension=php_com_dotnet.dll
★ Start > Run > services.msc Press Enter > Make sure the COM+ Event System service is turned on
It was built-in before PHP 5.4.5, but was separated in later versions. . .