$myapp = new COM("word.application"); // returns a fatal error: "Class 'COM' not found in c:/www/comConnector.php" shell_exec("whoami"); //returns "NT authority/system"
PHP 5.3.16 (cli) (built: Aug 15, 2012 20:06:57)Copyright (c) 1997-2012 PHP GroupZend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
Add COM support in php.ini:
[COM_DOT_NET] extension=php_com_dotnet.dll
Since you are using PHP 5.3.16, make sure you point to the global namespace:
$myapp = new \COM("word.application");
Even if your PHP file may be in the global namespace, but this is good practice.
Source: https://habr.com/ru/post/927181/More articles:copy partial lines to vi - vimCenter LinearLayout and Percentage fields - androidAndroid AudioRecord and MediaRecorder - androidhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/927179/no-access-to-models-in-admin-panel-with-debug-false&usg=ALkJrhhTKMnc4jYtS3F2KFd9zTM-VDDeaQGCM GC project identifier, which? - androidGCID GC register identifier and project identifier - androidRegexp-replace: multiple substitutions in a match - regexIs there a quick way to search for variables in R? - rMake parent maven project check all modules before deploying any of them - javaCannot find a mapping model for migration - UIManagedDocument master data migration - iosAll Articles