Thank you for your answers.
After couple of more hours trying to isolate root cause it looks like
1, COM not loaded properly although no error in wamp or apache or php during startup and icon green.
2, COM loaded properly but not found by script.
phpinfo says:
COM support enabled
DCOM support disabled
.Net support enabled
But I found many cases with COM extension where users tried to edit php.ini to include
[COM_DOT_NET]
extension=php_com_dotnet.dll
(because of some php change since 5.4.x version)
instead of existing
extension=php_com_dotnet.dll
However, this didnt work for me and also phpinfo says enabled in both cases.
So I tried to debug a script a bit and I got:
PHP Fatal error: Uncaught Error: Class 'COM' not found in E:\bot\bot.php:90
Stack trace:
#0 E:\bot\bot.php(215): start()
#1 {main}
thrown in E:\bot\bot.php on line 90
With this statement and statement COM extension is running, I believe there is a problem in path where the bot is trying to find COM.
This is line 90:
$WshShell = new COM("WScript.Shell"
;
and I dont know if I can tell somehow where to look for the COM?
I tried:
$WshShell = new \COM("WScript.Shell"
;
But no luck. Any ideas?
By the way during last hours I found I need to switch wampapache64 service back to be run as Local Service and tick "Enable interact with desktop" and I believed this was the main problem in my case. However still no luck after interaction enabled and wamp restarted.
EDIT:
In addition I tried a simple test.php like this:
<?php
if (extension_loaded('com')) {
echo "ok";
} else {
echo "ko";
}
?>
and the result is "ko".
So COM extension is not loaded although uncommented in php.ini and although checkbox in wamp gui... Not loaded and wamp nor apache nor php not screaming anything during startup and I have to discover such basic thing after so many hours spent on problem focusing on completely different things?
Why? And how to load it properly?
Edited 6 time(s). Last edit at 03/21/2020 01:20AM by meror.