Showing posts from May, 2015

IIS 8.5 PHP Cannot Upload File - Permission Denied

If you have problem of not able to upload file and the error log said: permission denied/Unable to create file at line 0 (something like that), here is my suggestion:

Go to your IIS, right click your application and select: Edit PermissionIn the "Security" screen where you can select a list of users and set permission, try to find if you have a user group called IUSR or IIS_IUSR.If you don't have it, use "Add" to add them inAssign "Full control" for those two groups and click "OK"Now here comes to the crucial part: Since PHP will first upload your file to a temporary folder first, then copy the file from temp folder to destination folder.  THE TEMPORARY FOLDER MUST ALSO BE WRITABLE BY IIS!!!So find that temporary folder out, add permission in that folder to allow IUSR and IIS_IUSR to have "full control"That would be OK. Hope that helps someone.