SunQuest
           Windows Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsWindows Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old January 29th, 2003, 08:22 AM
kennyb kennyb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 2 kennyb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face iis permission for php

I'm attempting to create a very simple counter script. It opens the file and increments the count fine, but when I try to reopen the file to write the new count to it, I get a permission denied error.

Warning: fopen("countlog.txt","r+") - Permission denied in c:\inetpub\wwwroot\future\count.php on line 15

Line 15 is this: $fp = fopen("countlog.txt","r+");

I've tried other flags with no difference. The server I'm publishing to is on our network, Win2000 with IIS5, and I have full administrator rights to it. When I look at the folder permissions tab, I have permission for everything (all boxes are checked). When I look at the file permissions tab, it is the same thing. That to me indicates that there should be no problem with me writing to the file. The text file was created just a few minutes ago in notepad, by me. So what could be the problem??? Does it have to be created by the PHP script instead? If so, any insight into how I should do this? I would write to a database if I could, but it isn't an option right now. PHP on Windows can be frustrating at times.

thanks
ken

Reply With Quote
  #2  
Old January 29th, 2003, 08:33 AM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
Quote:
Originally posted by kennyb
It opens the file and increments the count fine, but when I try to reopen the file to write the new count to it, I get a permission denied error.

Warning: fopen("countlog.txt","r+") - Permission denied in c:\inetpub\wwwroot\future\count.php on line 15

Line 15 is this: $fp = fopen("countlog.txt","r+");



So you are able to initially open the file and write to it? Are you properly closing and releasing the file?
__________________
El éxito consiste en una serie de pequeñas victorias día a día

MySQL, MS SQL, MS ACCESS, Oracle Database Manager - http://victorpendleton.net/products/psdviewer.html

Reply With Quote
  #3  
Old January 29th, 2003, 08:39 AM
kennyb kennyb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 2 kennyb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
reply

no bud, it doesnt let me change the contents of the file at all, sorry for being unclear. it just wont let me open the file to work on the contents of it at all.
ken

Reply With Quote
  #4  
Old January 29th, 2003, 10:25 AM
hedge hedge is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2002
Posts: 692 hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 21 h 49 m 55 sec
Reputation Power: 19
Well, it doesn't matter what your permissions are. The webserver runs as the IUSER_[machine name] local user so that user must have access to the file.

Reply With Quote
  #5  
Old February 11th, 2003, 05:01 AM
kib kib is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 3 kib User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i just been looking at URL

the trouble could be in your php.ini if you are working in so-called safe-mode:

URL

If you are experiencing problems with reading and writing to files and you're using the server module version of PHP, remember to make sure that the files and directories you're using are accessible to the server process.

If you are attempting to create a file in a directory, first makes sure you have read/write permissions on that directory.
If you do, check your apache config to make sure you are allowing directory write permissions.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsWindows Help > iis permission for php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway