Open up your php.ini file. This should be located in your windows or windows\system directory.
Search for the section with the title [com]
Within this section, set the following:
; allow Distributed-COM calls
com.allow_dcom = true
; autoregister constants of a components typlib on com_load()
com.autoregister_typelib = true
; register constants casesensitive
;com.autoregister_casesensitive = false
; show warnings on duplicate constat registrations
com.autoregister_verbose = true
Modify COM permissions to Allow PHP to Use the COM Interface
From the Start menu, select run and type dcomcnfg, as in the image below :
Depending on the version of windows you are running, a screen which resembles the one below will appear.