PHP readdir() return false even if permission are right

Today (So many times ) i face directory read issue using php. If you are trying to read a directory and readdir function is returning false even if php user have right permission (At least read permission) to that directory mainly while your server is on plesk panel

Please check open_basedir value in  php.in for that site/system. It should be unset or directory path should be define in that.