I'm trying to change the permissions for about four hundred files in a directory called "photos" without doing it once at a time. I'm doing this:
<?php
$d = opendir('/photos') or die($php_errormsg);
while (false !== ($f = readdir($d))) {
chmod ("$f", 0666);
}
closedir($d);
?>
However, I keep getting an error that says:
opendir(): open_basedir restriction in effect. File(/photos) is not within the allowed path(s): (/home/httpd/vhosts/********.com/httpdocs:/tmp)
I've tried adding this:
ini_set('open_basedir','/home/httpd/vhosts/********.com/httpdocs:/photos');
... with and without the : before /photos, but that didn't work.
Any thoughts?
Thanks in advance.