This function returns an error saying it can't open the file when permissions are correctly set and the file does in fact exist.
function getAvatars($curAvatar)
{
global $cfg_avatar_dir, $prefix, $misc_avatar_maxwidth, $misc_avatar_maxheight, $cfg_avatar_url;
$dirhandle = opendir($cfg_avatar_dir);
while( $filename = readdir($dirhandle) )
{
$file = substr($filename, 0, -4);
$file = eregi_replace("_", " ", $file);
if( substr($file, 0, 5) == "basic" || ( strtolower($filename) == strtolower($curAvatar) && $curAvatar != "" ) )
{
$sizestuff = GetImageSize("$cfg_avatar_dir/$filename");
if( $sizestuff[0] <= $misc_avatar_maxwidth && $sizestuff[1] <= $misc_avatar_maxheight )
{
$file = ltrim(eregi_replace("basic", "", $file));
}
}
}
closedir($dirhandle);
}
<b>Warning</b>: getimagesize: Unable to open 'C:/blizzPHP/avatars/basic_bob.jpg' for reading. in <b>C:\blizzPHP\sources\functions.php</b> on line <b>185</b><br>