File access permission error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Khairul Alam
Forum Newbie
Posts: 12
Joined: Tue Sep 09, 2003 6:27 am

File access permission error

Post by Khairul Alam »

I am using PHP in Windows 2000 platform.

I am using a text file like ( daily_visitors.pol etc.) to track the hit counter.


The script working well in previous version - PHP-4.2.1-win32.


But when I install PHP-4.3.2-win32 version, it gives me some annoying errors.
----------------

Warning: fopen(c:/inetpub/wwwroot/shah/cnt/daily_visitors.pol): failed to open stream: Permission denied in c:\inetpub\wwwroot\shah\cnt\counter.php on line 157

Warning: fwrite(): supplied argument is not a valid stream resource in c:\inetpub\wwwroot\shah\cnt\counter.php on line 161

Warning: fclose(): supplied argument is not a valid stream resource in c:\inetpub\wwwroot\shah\cnt\counter.php on line 162

Warning: fopen(c:/inetpub/wwwroot/shah/cnt/daily_count.pol): failed to open stream: Permission denied in c:\inetpub\wwwroot\shah\cnt\counter.php on line 164

Warning: fwrite(): supplied argument is not a valid stream resource in c:\inetpub\wwwroot\shah\cnt\counter.php on line 165

Warning: fclose(): supplied argument is not a valid stream resource in c:\inetpub\wwwroot\shah\cnt\counter.php on line 166

-----------

Any insrtuction will be appriciable.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

if you right-click in the windows explorer on daily_visitors.pol and open the properties sheet you can check the file permissions on the security tab.
Khairul Alam
Forum Newbie
Posts: 12
Joined: Tue Sep 09, 2003 6:27 am

Post by Khairul Alam »

To Volka

ya I check out the permissions. These are OK.

I think the problem is something else. Thanx.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

These errors:
Warning: fopen(c:/inetpub/wwwroot/shah/cnt/daily_visitors.pol): failed to open stream: Permission denied in c:\inetpub\wwwroot\shah\cnt\counter.php on line 157
and
Warning: fopen(c:/inetpub/wwwroot/shah/cnt/daily_count.pol): failed to open stream: Permission denied in c:\inetpub\wwwroot\shah\cnt\counter.php on line 164
are causing the other errors and are permissions errors - may we see line 157+164 and could you tell us what the permissions are on the files currently.

Mac
Khairul Alam
Forum Newbie
Posts: 12
Joined: Tue Sep 09, 2003 6:27 am

Post by Khairul Alam »

To twigletmac

I just got my fault. And i solved it.

I just miss to check the full permission to Everyone option.

It's OK now.

Thanx.
Post Reply