« Previous Next »

Thread: PHP Error related to permissions

Last post 06-29-2009 4:02 PM by paulwratt. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 06-27-2009, 9:48 AM

    PHP Error related to permissions

    ERROR: PHP Warning: fopen(inquiry.txt) [function.fopen]: failed to open stream: Permission denied in C:\inetpub\wwwroot\HollyDilts\eform.php on line 16 CODE: $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; // set file to write $file = 'inquiry.txt'; // open file $fh = fopen($file, 'w') or die('Could not open file!'); // write to file fwrite($fh, "Cool message") or die('Could not write to file'); // close file fclose($fh); ?> PERMISSIONS ALREADY SET: IIS_IUSRS have FULL PERMISSIONS from wwwroot on down. ENVIRONMENT: Vista 32 / IIS 7 / PHP 5 ANY assistance would be greatly appreciated.
  • 06-27-2009, 9:52 AM In reply to

    Re: PHP Error related to permissions

    Just figured it out. After hours of troubleshooting, I realized that I had the wrong file path.
  • 06-29-2009, 4:02 PM In reply to

    Re: PHP Error related to permissions

    glad you figured it out..

     .. can you give me any pointers (from your setup) as to how you are getting PHP error output (I have checked php-cgi to make sure its not dll related)

     EDIT:

    .. OK, it must be contagiuos, I also figured it out, correct "windows" php.ini setup.

    for anyone else who gets this far (working php but not errors) go here

Page 1 of 1 (3 items)
Microsoft Communities