Can't Open Directory, fopen warning

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
kkonline
Forum Contributor
Posts: 251
Joined: Thu Aug 16, 2007 12:54 am

Can't Open Directory, fopen warning

Post by kkonline »

Hi,
I am working on a rss aggregator script. however when I installed the same set of scripts on 1 webhost it works perfectly fine; however on another host of mine i get the following error

Code: Select all

PHP Warning:  fopen(/home/mysite/public_html/news/.rss.html) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in /home/mysite/public_html/news/rsslib.php on line 84
What can be the reason that it works on one webhost and not on another?
The directory is 755 and all files in it are 644
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Can't Open Directory, fopen warning

Post by VladSun »

Maybe open_dir or safe_mode are used. Also try to remove the starting period from the file name.
There are 10 types of people in this world, those who understand binary and those who don't
kkonline
Forum Contributor
Posts: 251
Joined: Thu Aug 16, 2007 12:54 am

Re: Can't Open Directory, fopen warning

Post by kkonline »

The issue has been resolved. The dir is 777 and the contents within which were 644 have now been chmoded to 666 and now it's fine.
Post Reply