Edit report at http://bugs.php.net/bug.php?id=53591&edit=1
ID: 53591 Updated by: [email protected] Reported by: sbacsa at gmail dot com Summary: exec() fails to impersonate calling context when fastcgi.impersonate is true -Status: Open +Status: Bogus Type: Bug Package: IIS related Operating System: Windows Server 2008 PHP Version: 5.3.4 Block user comment: N Private report: N New Comment: You have to give FCGI's php handler the permission to execute codes. Check out the IIS documentation (as far as I remember it is also documented in the PHP manual, in the IIS configuration part). Previous Comments: ------------------------------------------------------------------------ [2010-12-22 00:10:41] sbacsa at gmail dot com Description: ------------ It appears that enabling fastcgi.impersonate on Windows in PHP 5.3.x does not actually impersonate the calling user when using exec() or similar. I would just get messages saying "Cannot fork", whereas in PHP 5.2.x there was no such error. Turning off fastcgi.impersonate fixed this issue, as IIS seems to run PHP in the user context of the worker process anyway. Test script: --------------- <? // This will fail when fastcgi.impersonate = 1 in PHP 5.3.x exec("c:\\path\\to\\executable.exe"); Expected result: ---------------- The file should be successfully executed if the worker process user has permission to access the EXE. Actual result: -------------- Regardless of worker process permissions, an error message saying: "Warning: exec() [function.exec]: Unable to fork [c:\path\to\executable.exe]" is encountered. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53591&edit=1
