Bug #77503 [Opn]: COM does not work in v5.6
| From: | cmb@php.net | Date: | Thu, 24 Jan 2019 12:31:30 +0000 |
| Subject: | Bug #77503 [Opn]: COM does not work in v5.6 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219166@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77503&edit=1
ID: 77503
Updated by: cmb@php.net
Reported by: pch at astrowin dot org
Summary: COM does not work in v5.6
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: Windows 8.1
-PHP Version: 5.6.40
+PHP Version: 7.2
Block user comment: N
Private report: N
New Comment:
> "Class not registered"
This might be a 32bit vs. 64bit issue (aka x86 vs x64).
> Fatal error: Class 'COM' not found
This is almost certainly caused by the php_com_dotnet.dll not
being loaded (like @nikic already suggested). Try something like:
var_dump(class_exists('COM'));
Also note that only PHP-7.2 and up will receive non-security
related bug fixes.
Previous Comments:
------------------------------------------------------------------------
[2019-01-23 18:59:16] pch at astrowin dot org
Yes, phpinfo said com_dotnet was installed and active. As I mentioned in my original note.
------------------------------------------------------------------------
[2019-01-23 09:30:41] nikic@php.net
If it says "Class 'COM' not found", that means that the extension is not loaded.
Please check if the extension is present (and not commented out) in your php.ini file.
------------------------------------------------------------------------
[2019-01-23 00:53:45] pch at astrowin dot org
Description:
------------
Using PHP v5.4.45 the following works as expected:
$obj = new COM("astro_php_h.astro_php_h_class");
but in PHP v5.6.39 or 5.6.40 and above (up to and including v7.2), it does not work, always giving
me an error message that "Class not registered" or this error message using XAMPP
"Fatal error: Class 'COM' not found in C:\My Documents\My
Webs\connexions.com\public_html\astro5\allen\test_dll.php on line 15".
I am using the same everything on my computer except for the PHP version. My phpinfo() file shows
that the com_dotnet extension is enabled and active.
Test script:
---------------
try
{
$obj = new COM("astro_php_h.astro_php_h_class");
}
catch (com_exception $e)
{
echo "<br> I cannot load the DLL.";
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77503&edit=1