I can mkdir and rmdir but not 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
stephdumais
Forum Newbie
Posts: 1
Joined: Sat Feb 28, 2004 6:48 am

I can mkdir and rmdir but not opendir????

Post by stephdumais »

Hi, I'm creating a basic file manager and started with the directory browser.

One script browses the directory list, one creates directories and the other deletes them. (data is updated in a Mysql DB as well)

I can mkdir without a problem and can even rmdir the folder afterwards. The problem is when I try to opendir a folder generated through the script, I get this error:

opendir(): SAFE MODE Restriction in effect. The script whose uid is [...]

I'm still a novice in PHP coding but shouldn't I be able to opendir if I could create and delete the dirs in the first place?

I checked my phpinfo and here is what I get:
safe_mode (local:On) (master:Off)
safe_mode_gid (local:Off) (master:Off)

Any ideas how I could avoid the opendir problem?

Thanks
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Try addnig this to your Apache configuration file...

<Directory /where/you/install/phpcollab/>
php_admin_value safe_mode 0
</Directory>

Apply the changes and see if you still get the error.
Post Reply