ID: 48852 User updated by: trutas dot ctx at gmail dot com Reported By: trutas dot ctx at gmail dot com -Status: Feedback +Status: Open Bug Type: IIS related Operating System: Windows Server 2003 x64 IIS6.0 PHP Version: 5.3.0 New Comment:
i have installed and configured as recommended at http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/ can i further configure the FastCGI/PHP user anywhere else? IIS user is configured correctly (- home directory with Run as trustedDomain\iisuser) and the destination folder has trustedDomain\iisuser modify and everyone modify . Regards, Previous Comments: ------------------------------------------------------------------------ [2009-07-08 15:18:27] paj...@php.net Be sure that you configured the user correctly or that the user has the correct access. ------------------------------------------------------------------------ [2009-07-08 15:15:19] trutas dot ctx at gmail dot com FastCGI ------------------------------------------------------------------------ [2009-07-08 15:13:50] trutas dot ctx at gmail dot com Note: test.php is located at \\share\intraroot$\site\ i've just tested it further and tryed a few workarounds: - it doesn't work with relative path (since both files are within the same share) "..\\folder\\file.txt"; - it doesn't work with dirname(__FILE__)."\\..\\folder\\file.txt"; - does not work with forward slashes //share/... - the error is "permission denied" even if the destination folder doesn't exist - i've found this because at a time i had wrongly typed \\\\share\\intraroot$folder\\file.txt - that does not exist; I'm guessing it has something to do with the home directory in IIS being on a remote share - the production servers are clustered... Every other technology (vbscript, .NET) on IIS accesses the shares normally. ------------------------------------------------------------------------ [2009-07-08 15:03:05] paj...@php.net How did you install php? FCGI or ISAPI? ------------------------------------------------------------------------ [2009-07-08 14:01:20] trutas dot ctx at gmail dot com Description: ------------ Access denied on a simple file_put_contents - the strange thing is vbscript test file on the same folder works - destination has everyone->modify/read/write. localhost/test.asp localhost/test.php i think it is not relevant but test.php and test.asp are located on the same \\share that we're trying to save the file to (but on a different folder). Apparently it works if we map this share to a local drive and use the local path (eg. E:\ ); file_get_contents works fine. We are using Windows 2003 Server x64, IIS 6.0, PHP 5.3RC04 x64 via MS FastCGI . Reproduce code: --------------- <?php file_put_contents("\\\\share\\intraroot$\\folder\\file.txt", "..."); ?> Expected result: ---------------- file saved with content "..." Actual result: -------------- PHP Warning: file_put_contents(\\share\intraroot$\folder\file.txt): failed to open stream: Permission denied in ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48852&edit=1