Reputation: 1993
I've recently installed PHP 5.6.37 on a Windows Server 2012 R2 machine.
PHP folder has been copied from a Windows 10 machine where it works fine.
Because it isn't a proper installation, I've manually added C:\php
to the PATH
environment variable.
When I try to run some code which uses COM classes, it throws:
Fatal error: Class 'COM' not found in XXXX on line 42
Looking for a solution and I found this answers:
But none of those worked for me, because both (extensions and php.ini
file) were fine, since it worked on the Windows 10 machine before.
Where the issue could be then?
Upvotes: 0
Views: 466
Reputation: 1993
PHPRC = C:\php
After looking around a little bit more, I found the problem was caused by the manual copy of the PHP folder, because I've skipped the installation with the .msi
file. The installation file not only add PHP folder to PATH
variable but it also creates a new variable called PHPRC
which determines where the Runtime Configuration is located (C:\php
by default).
Upvotes: 1