php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #62623 Class 'COM' not found
Submitted: 2012-07-20 20:01 UTC Modified: 2012-10-23 18:56 UTC
Votes:12
Avg. Score:4.5 ± 0.8
Reproduced:11 of 11 (100.0%)
Same Version:9 (81.8%)
Same OS:9 (81.8%)
From: bugzilla33 at gmail dot com Assigned: philip (profile)
Status: Closed Package: COM related
PHP Version: 5.4.5 OS: win7
Private report: No CVE-ID: None
 [2012-07-20 20:01 UTC] bugzilla33 at gmail dot com
Description:
------------
Class 'COM' not found. Bug introduced in PHP 5.4.5 VC9.

Test script:
---------------
<?php
 $o=new COM('WScript.Shell');
?>

Expected result:
----------------
PHP 5.4.4 include COM Class.

Actual result:
--------------
Fatal error: Class 'COM' not found in C:\htdocs\test.pl\1.php on line 2


Patches

ldap (last revision 2014-02-11 15:36 UTC by osfed2709 at gmail dot com)
comPatch (last revision 2013-11-26 15:44 UTC by c1587424 at drdrb dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-20 20:30 UTC] bugzilla33 at gmail dot com
This problem is on Apache 2.2.21.
PHP via module.
 [2012-07-21 00:22 UTC] hankmanw7 at home dot nl
As of PHP 5.4.5 and above the COM extension isn't compiled into PHP anymore.
It'll still be delivered with the standard PHP release but must be enclosed
with the "extension = php_com_dotnet.dll" directive in php.ini.
 [2012-07-21 07:35 UTC] bugzilla33 at gmail dot com
There is no:
;extension=php_com_dotnet.dll
in original php.ini,

why?
 [2012-07-21 08:04 UTC] bugzilla33 at gmail dot com
Please modify php.ini's in package, add:
;extension=php_com_dotnet.dll

and

update
http://www.php.net/manual/en/com.installation.php
 [2012-07-21 14:40 UTC] felipe@php.net
-Type: Bug +Type: Documentation Problem
 [2012-10-23 08:24 UTC] David dot Gausmann at measX dot com
Today I stumbled over this bug, too.

The first thing I did was it to look into the Installation/Requirements section of the COM help and found nothing.
Then I got very angry and used Google; then I found this bug report.

The next thing I thought was "Yes, it's still PHP."

Since my update from 5.3 to 5.4 I've got many trouble, such as the different default parameter for htmlspecialchars, which destroys my ISO encoded data from the database (and you preferred solution to add the parameters to each call is insane).

So, please fix (at least) this bug, as the described in the post previously to this one.

Kind Regards
David Gausmann
 [2012-10-23 17:49 UTC] philip@php.net
-Status: Open +Status: Analyzed
 [2012-10-23 17:49 UTC] philip@php.net
Information from within this bug report and within the user comments at 
php.net/com conclude that the fix for PHP bug #62146 changed this behavior, and 
that: 

This extension is no longer compiled by default as of 5.3.15 and 5.4.4. I'm not 
sure if that is intentional, and instead if it was a problem caused while 
allowing it to be shared, but regardless it happened. We'll see.

But today the documentation is wrong.
 [2012-10-23 18:55 UTC] philip@php.net
Automatic comment from SVN on behalf of philip
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=328122
Log: This is now bundled as shared, as of 5.3.14 / 5.4.4. Closes bug #62623
 [2012-10-23 18:56 UTC] philip@php.net
-Status: Analyzed +Status: Closed -Assigned To: +Assigned To: philip
 [2012-10-23 18:56 UTC] philip@php.net
This is now closed, thank you for the bug report. The change will show up online 
this upcoming Friday.
 [2012-10-23 21:51 UTC] philip@php.net
Automatic comment from SVN on behalf of philip
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=328124
Log: Updated version numbers. The related fix was fixed in 5.x.4, whereas the Win builds changed with 5.x.5. Closes bug #62623
 [2012-12-20 12:23 UTC] fabiennerondeau at orange dot fr
Class 'COM' not found.
PHP 5.4.3.

However, I've installed as follow:
I've installed the php_com_dotnet.dll DLL in php extensions directory.

I've added lines in my php.ini file :
[COM_DOT_NET] 
extension=php_com_dotnet.dll

I've restarted services.

Thanks for any idea.
 [2012-12-20 12:29 UTC] David dot Gausmann at measX dot com
This ticket has already been closed...

The error in your configuration is the "[COM_DOT_NET]".
The "extension=php_com_dotnet.dll" entry should belong to the "[PHP]" section.
If you write them under different sections (such as "[COM_DOT_NET]") PHP won't load these extensions.

Kind Regards
David Gausmann
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 09:01:28 2024 UTC