Reputation: 15269
In my functions.php
I got:
$size = getimagesize($avatarpath . "/" . $file);
$avatarpath
is $avatarpath = dirname(__FILE__)."/img/avatars";
My structure:
functions.php (in the same directory as img folder). img/avatars
Chmods of functions.php , img, avatars has been set to 777.
And I still receive the following message:
Warning: getimagesize(/home/godaddy/private_html/img/avatars/avatar_1.png): failed to open stream: Permission denied in /home/godaddy/private_html/img/avatars/functions.php on line 1337
Upvotes: 2
Views: 6096
Reputation: 1199
Check the user that php runs under. If you're with godaddy, they use virtual servers so your php user may not actually have access even if you've chmod'd it. Find out the user, then chown it to that user and see if it helps.
Upvotes: 1