Easy thing: opendir()

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
support_mx
Forum Newbie
Posts: 3
Joined: Wed May 27, 2009 9:22 pm

Easy thing: opendir()

Post by support_mx »

I have this error message:
Warning: opendir(/var/spool/vm/d/1/in) [function.opendir]: failed to open dir: Permission denied in /var/www/html/astmail/folder.class.php on line 48
couldn't open directory

what could be the problem directories have 755

what is worng?

thank you
support_mx
Forum Newbie
Posts: 3
Joined: Wed May 27, 2009 9:22 pm

Re: Easy thing: opendir()

Post by support_mx »

I was searching for a solution, I did'nt find anything
maybe the directory (/var/spool/vm/d/1/in) is not visible by apache, so thats why the application cannot work.

another solution: copy the files from (/var/spool/vm/d/1/in) to (/var/www/), throught cron job, or another languaje like jsp, but if i do this i will be inside of antoher problem 'permissions' a user can only see his folder... no any one.... so if i move those files to www folder it will be public....suggestions??
Ex:
User1: (/var/spool/vm/d/1/in)
User2: (/var/spool/vm/d/2/in)
User3: (/var/spool/vm/d/3/in)
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Easy thing: opendir()

Post by pickle »

Maybe it's not just the "in" directory you need to check, but also directories further up the path.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
support_mx
Forum Newbie
Posts: 3
Joined: Wed May 27, 2009 9:22 pm

Re: Easy thing: opendir()

Post by support_mx »

pickle wrote:Maybe it's not just the "in" directory you need to check, but also directories further up the path.
I think you mean copy the 'in' directory and files directories inside it, to 'www' folder ... dunno :?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Easy thing: opendir()

Post by pickle »

No, I mean maybe it's not the permissions on the 'in' directory that are causing the problems. Maybe it's the "1", "d", "vm", or "spool" directories. /var/spool/ is usually used by printing right? Maybe Apache doesn't have rights to that directory.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Easy thing: opendir()

Post by Weirdan »

pickle wrote:/var/spool/ is usually used by printing right?
Not necessary printing, it's used for all kinds of spools... mail spool, printer spool, cron spool, etc.
Post Reply