|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
Quote:
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 |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Windows Help > iis permission for php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|