# Avatars uploading but not displaying

I am having trouble with the Avatar plugin - they are uploading but not showing up. I am on a local wamp server developing a test site. When I upload my photo, I crop the picture. No image appears when the page refreshes, even though the screen does say "Avatar uploaded."

When I check the Avatars > User folder, I do see that the image uploaded. However, when I post a new blog entry, the avatar does not appear.

I have all the files in the proper places and the .htaccess file has the new line in it. When I check the error log, I see this:

[02-Feb-2010 13:21:38] PHP Notice: Undefined index: HTTP_IF_MODIFIED_SINCE in C:\wamp\www\wp-content\avatar.php on line 14 
Any help would be appreciated. Thank you!

• Andrew

Hiya,

Is the gd image library available?

Thanks,
Andrew

• SethResler

Yes, it is enabled. It looks like I left a character off the end of the error message - the problem is in line 142, not line 14.

• Andrew

The gd image library provides a set of functions that allow for the manipulations (resizing, etc) of images.

This may help:
http://php.about.com/od/advancedphp/ss/gd_library.htm

Also check to make sure that you've correctly added the htaccess rewrite rule required for the avatars plugin.

Thanks,
Andrew

• SethResler

The GD library appears to be enabled and the .htaccess file has the additional line added. The error is coming in line 142, which is this:

$client_last_modified = trim($_SERVER['HTTP_IF_MODIFIED_SINCE']);

• SethResler

There seemed to be a conflict with The Reveal-IDs-for-WP-Admin plugin - there was an error showing up in the avatar column of the Admin > Users page. I removed that, but now only the default avatar displays on the upload page, and still nothing shows up in the frontend of the blog post.

When I click on the Alternative Upload button, this error message briefly flashes on the screen:

There was an error uploading the file, please try again.
Warning: getimagesize(C:\wamp\www/wp-content/avatars/user/d41/) [function.getimagesize]: failed to open stream: No such file or directory in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1035</p>
<p>Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1070</p>
<p>Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1078</p>
<p>Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1086</p>
<p>Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1094
`
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1102

Warning: unlink(C:\wamp\www/wp-content/avatars/user/d41/) [function.unlink]: Permission denied in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1235

And some new errors in the PHP error log:

[02-Feb-2010 16:31:08] PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1070</p>
<p>[02-Feb-2010 16:31:08] PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1078</p>
<p>[02-Feb-2010 16:31:08] PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1086</p>
<p>[02-Feb-2010 16:31:08] PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1094</p>
<p>[02-Feb-2010 16:31:08] PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1102</p>
<p>[02-Feb-2010 16:31:08] PHP Warning: unlink(C:\wamp\www/wp-content/avatars/user/d41/) [function.unlink]: Permission denied in C:\wamp\www\wp-content\mu-plugins\avatars.php on line 1235

• Andrew

Did you create the avatar directories?

Thanks,
Andrew

• SethResler

yes, but I'm in wamp, so I don't have the ability to change the chmod to 777. I am removing "read-only" from the directories, tho it seems to be constantly resetting to "read-only" on its own.

• pokali

I'm having a very similar problem with the Avatar plugin. It's installed probably and I have created all required folders and made the change to the .htaccces file but still I can't get the avatars to show for any user or blog. I am also on a local WampServer and I get this error on one of the users.

There was an error uploading the file, please try again.
Warning: getimagesize(C:\wamp\www\wordpress-mu/wp-content/avatars/user/c9f/IMG_0014.JPG) [function.getimagesize]: failed to open stream: No such file or directory in C:\wamp\www\wordpress-mu\wp-content\mu-plugins\avatars.php on line 739

• drmike

Did you check to see if GD is enabled on your server? getimagesize is a part of the GD library and if the webserver can't find it, GD may not be installed or php can't find it.