php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32061 Call to new COM() doesn't work
Submitted: 2005-02-22 06:51 UTC Modified: 2005-02-22 13:43 UTC
From: stevedar at verizon dot net Assigned:
Status: Not a bug Package: COM related
PHP Version: 4.3.10 OS: Windows 2000
Private report: No CVE-ID: None
 [2005-02-22 06:51 UTC] 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!


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-22 08:27 UTC] sniper@php.net
Search first..this has already been reported dozen times and fixed too in CVS.

 [2005-02-22 13:43 UTC] stevedar at verizon dot net
I appologize.  I did the search, I downloaded the CVS and was pretty sure I unzipped it over my current PHP environment, but I must not have done so or something.  The latest CVS does in fact work.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 06:01:30 2024 UTC