简体   繁体   中英

PHP exec running in background with Windows & Apache but not Nginx

I have tried both Apache/PHP and Nginx/PHP with nearly the same configuration.

I am running this script:

<?php
exec("calc.exe");
?>

In Apache/PHP, calc.exe is not opened but is found running as a background process. In Nginx/PHP, calc.exe is opened properly.

I would like to use Apache/PHP to open calc.exe properly.

Exec has no functionality with display, it will spawn processes and such under a different user (thus no affect on the current logged in user)

Scenario; your logged in as User1

On php do the following;

 Exec("whoami");

You will see a different user which apache/web service is running as

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM