Partner and Community Forums
Unable to fork error for exec
Last post Aug 28, 2018 08:28 PM by williamyiu
Sep 08, 2014 10:18 AM|thepdcemulator|LINK
We are running PHP 5.5.9 (NTS, x86) on Windows Server 2012 R2 with FCGI, Kerberos Auth and fastcgi.impersonate = 1. Application Pool runs with a AD User Service Account, W3P Service runs with "local system" Account.
Execution is enabled in IIS Script Handler for FCGI-PHP. Handler Feature Permissions is also set to "Execute".
Now I am trying to run a application from command line, but this also simple commands like dir or ping are failing with "unable to fork".
Warning: exec(): Unable to fork [dir] in D:\mypath\myfile.php on line
I have tried in my DEV-Environment:
- added read+execute Permissions to "Everyone" to c:\windows\syswow64\cmd.exe
- copied c:\windows\syswow64\cmd.exe to PHP-dir
- added read+execute Permissions to ISUSR to cmd.exe im PHP-dir
- added read+execute Permissions to IIS_IUSRS to cmd.exe im PHP-dir
- upgraded to PHP 5.5.16
- watched with sysinternals procmon, found no error or something
- searched hours and hours for this on the web
Any hints? Thank you for your help!
Aug 25, 2016 10:39 PM|cstobbe|LINK
I had this problem. It was caused by conflicting IIS settings in these 2 locations:
After I changed the web site authentication to "Application Pool Identity",
exec() ran successfully.
Nov 19, 2017 07:26 AM|iisdev2001|LINK
Finally! That's it! Thank you.
Aug 28, 2018 08:28 PM|williamyiu|LINK
I tried this and it solved the "Unable to fork" issue. But the site can't create symlink. Any help?