I need a PHP script to have writing permission in a directory. PHP 5.3 is running as FastCGI under IIS 7 with windows server 2008 as OP. On my php error logs, I got \"permis
Actually, it's a little bit more complicated.
The first thing to do is to create a simple PHP file on the concerned website. (It's important to create the file on the concerned website because each website can have a different setting.) The content of this file should be:
Navigate to this file using a browser.
** Case 1 **
If your browser shows :
string(1) "1"
Then, you need to execute the following command (you need to replace "Default Web Site" by the name you gave to your website in IIS) :
%windir%\system32\inetsrv\appcmd.exe list config "Default Web Site" ^
/section:anonymousAuthentication
You will receive an answer which looks like this :
The information you are looking for is the value of the username
attribute of the anonymousAutthentification
tag.
IIS AppPool\AppPoolName
(replace "AppPoolName" with the name of your website's application pool).** Case 2 **
If your browser shows :
string(1) "0"
You need to give write permissions to IIS AppPool\AppPoolName
(replace "AppPoolName" with the name of your website's application pool).