Fatal error: Class 'COM' not found in C:\inetpub\wwwroot\test.php on line 22
10,546
Solution 1
The php 5.4.5 build from windows.php.net ships the com/dotnet module as extension dll. If that's the case with your version of php too you can enable the module via
extension=php_com_dotnet.dll
in your php.ini
Quotation from this link: https://stackoverflow.com/a/12002924/1274378
Solution 2
If you are using windows 8 and Apache server and extension=php_com_dotnet.dll
not worked for you then:
copy php_com_dotnet.dll
file to c:/windows/system32
and write to php.ini
file.
extension = c:/windows/system32/php_com_dotnet.dll
I'm using Windows 8 and Apache server for windows. Worked for me.
Related videos on Youtube
![Liam Fell](https://lh3.googleusercontent.com/-BLazQBPkT5Y/AAAAAAAAAAI/AAAAAAAAAAA/ACHi3rfbK5wIfh-KXqSi5rY483dhxgVCwQ/photo.jpg?sz=256)
Comments
-
Liam Fell almost 2 years
There is an IIS 7 webserver and PHP 5.3
I have set com.allow_dcom = true on php.ini file and restarted the webserver.
I need to use hmailserver by:
$obBaseApp = new COM("hMailServer.Application");
It says:
Fatal error: Class 'COM' not found in C:\inetpub\wwwroot\test.php on line 22