Can't get UniObjects COM Object to load with PHP in Windows 2008 R2

359 views Asked by At

I am trying to use COM function in PHP but I am not sure what am I doing wrong. This is my first line in PHP script

$UOSession = new COM("UniObjects.Unioiafctrl") or die("Cant instantiate UO");

I did use regsvr32 to register uniobjects.dll and it was successful, but problem is that if I have any code before this line it executes, any code after this line doesn't work and I don't even get any message was dll successfully instantiated or no. I would assume that if its not instantiated I would get message "Cant instantiate UO" but I don't get any message. That would meant that it was successful, but code stops right there... Does anybody knows what am I doing wrong?

Windows Server 2008 R2 x64, IIS7, PHP 5.3

1

There are 1 answers

1
NeerPatel On

Zuboje,

Figured out the issue, with the help of International Spectrum Editor Nathan Rector. Download 32bit version of PHP and use it. You probably have a 64bit version of PHP and it wont be able to read your 32bit COM Object. I was able to install a 32bit version of WAMP and it resolved my issue.