#32061 [Opn->Bgs]: Call to new COM() doesn't work

From: Date: Tue, 22 Feb 2005 07:27:39 +0000
Subject: #32061 [Opn->Bgs]: Call to new COM() doesn't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-74401@lists.php.net to get a copy of this message
ID: 32061 Updated by: sniper@php.net Reported By: stevedar at verizon dot net -Status: Open +Status: Bogus Bug Type: COM related Operating System: Windows 2000 PHP Version: 4.3.10 New Comment: Search first..this has already been reported dozen times and fixed too in CVS. Previous Comments: ------------------------------------------------------------------------ [2005-02-22 06:51:59] stevedar at verizon dot net Description: ------------ The code I want to execute is: $objCOM = new COM("PFProCOMControl.PFProCOMControl.1"); if ( !is_object ( $objCOM ) ) { echo 'objCOM is not a object'; } It always comes out saying that $objCOM is not an object & therefore I cannot work with its methods and so on. If I call them I get: objCOM is not a object Fatal error: Call to a member function on a non-object in C:\Inetpub\wwwroot\mcr\testpfp.php on line 27 If I switch to this: $objCOM = com_load("PFProCOMControl.PFProCOMControl.1"); if ( !is_object ( $objCOM ) ) { echo 'objCOM is not a object'; } It works! I have an object defined... Reproduce code: --------------- $objCOM = new COM("PFProCOMControl.PFProCOMControl.1"); if ( !is_object ( $objCOM ) ) { echo 'objCOM is not a object'; } Expected result: ---------------- I expect no output because $objCOM IS AN OBJECT! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32061&edit=1

« previous php.bugs (#74401) next »