Title: [Plugin: WordPress-Amazon-Associate]Auto-update failure
Last modified: August 20, 2016

---

# [Plugin: WordPress-Amazon-Associate]Auto-update failure

 *  Resolved [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/)
 * Hi,
 * After Auto-update to 1.7.0, I got a following error and WordPress-Amazon-Associate
   can’t work.
 * > Fatal error: Call to undefined function wp_get_current_user() in /home/users/
   > 1/xxx.jp-xxx/web/xxxt/blog/wp-includes/capabilities.php on line 1039
 * The following messages are errors I got in Dashboard when auto-update.
 * > Warning: fopen(/home/users/1/xxx.jp-xxx/web/xxxt/blog/wp-content/plugins/wordpress-
   > amazon-associate/wordpress_amazon_associate.php) [function.fopen]: failed to
   > open stream: No such file or directory in /home/users/1/xxx.jp-xxx/web/xxxt/
   > blog/wp-includes/functions.php on line 4339
   >  Warning: fread(): supplied argument
   > is not a valid stream resource in /home/users/1/xxx.jp-xxx/web/xxxt/blog/wp-
   > includes/functions.php on line 4342 Warning: fclose(): supplied argument is
   > not a valid stream resource in /home/users/1/xxx.jp-xxx/web/xxxt/blog/wp-includes/
   > functions.php on line 4345
 * I re-installed ver. 1.6.1 and tried to auto-update again.
    But I got same errors.
 * Without auto-update, After I ftp WordPress-Amazon-Associate’s files into my wordpress
   plugin directory, WordPress-Amazon-Associate can work.
 * My wordpress is ver. 3.2
 * Thank you.
 * [http://wordpress.org/extend/plugins/wordpress-amazon-associate/](http://wordpress.org/extend/plugins/wordpress-amazon-associate/)

Viewing 15 replies - 1 through 15 (of 15 total)

 *  [akinschris](https://wordpress.org/support/users/akinschris/)
 * (@akinschris)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190595)
 * Have the same problem on my site as well – acstrategy.com.
 *  [Temlakos](https://wordpress.org/support/users/temlakos/)
 * (@temlakos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190598)
 * That’s what happened to me. Now where do I go to get Version 1.6.1? My site is
   totally down.
 *  Plugin Author [Matthew Denton](https://wordpress.org/support/users/mdbitz/)
 * (@mdbitz)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190611)
 * Hi everyone, Looking at the above error message I’m not sure why the install 
   is failing as it looks like it was not able to download one of the files in the
   plugin. I re-uploaded the latest file and did the auto-update on a few of my 
   sites all without issue.
 *  [Temlakos](https://wordpress.org/support/users/temlakos/)
 * (@temlakos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190622)
 * The resolution:
 * require_once(‘pluggable.php’)
 * Add this line to the file wp-includes/capabilities.php. Add it directly after
   the initial comments and **before** the first class definition.
 * WordPress needs to get on this right away. How many other plugins are going to
   crash WordPress in just that way? This was an accident waiting to happen.
 *  [johanhburger](https://wordpress.org/support/users/johanhburger/)
 * (@johanhburger)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190626)
 * Hi there, I have exactly the same problem. To add insult to injury, my site is
   down and I cannot get access to remove the plugin. Can someone give me a blow
   by blow process of what to do? Big please!
 *  Thread Starter [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190680)
 * Hi johanhburger san,
 * Using FTP, Delete “/wp-content/plugins/wordpress-amazon-associate/wordpress_amazon_associate.
   php” file
 * or whole “wordpress-amazon-associate” directory.
 * If you change plugin directory, “wordpress_amazon_associate.php” will be found
   in other directory.
 *  [Yudhi Karunia Sutan](https://wordpress.org/support/users/yudhi-karunia-sutan/)
 * (@yudhi-karunia-sutan)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190685)
 * I tried to restore database from my backup but didn’t help at all.
    Then i try
   to delete the plugin folder under $WP_HOME/wp-content-plugins/wordpress-amazon-
   associate). Now my website is possible to be access again. The update is not 
   good.. gladly..
 *  [gatorbob](https://wordpress.org/support/users/gatorbob/)
 * (@gatorbob)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190696)
 * Yep, broke my entire site too. Took me a few minutes to figure out after I realized
   site was down. Geez.
 *  [djeyewater](https://wordpress.org/support/users/djeyewater/)
 * (@djeyewater)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190703)
 * I followed Temlakos advice, except rather than edit a core file I edited the 
   plugin file and added:
    `require_once(ABSPATH . WPINC . '/pluggable.php');`
 *  [sojyujai](https://wordpress.org/support/users/sojyujai/)
 * (@sojyujai)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190706)
 * Thanks djeyewater,
    I was about to post that Temlakos solution works if you change
   the line to: require_once(‘pluggable.php’);
 * but your method for modifying wordpress_amazon_associate.php instead of a core
   file seems like a better solution.
 *  [parisvega](https://wordpress.org/support/users/parisvega/)
 * (@parisvega)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190719)
 * Awesome. Thanks guys. Problem solved after added `require_once(ABSPATH . WPINC.'/
   pluggable.php');` to wordpress_amazon_associate.php
 *  [joespake](https://wordpress.org/support/users/joespake/)
 * (@joespake)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190742)
 * I uninstalled the plugin. How long will it take WP/Amazon to resolve this issue
   so I can download it safely again?
 *  Plugin Author [Matthew Denton](https://wordpress.org/support/users/mdbitz/)
 * (@mdbitz)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190747)
 * Hi Everyone, sorry for the problems this caused. It appears that the issue is
   hit or miss for different users and I can’t pin down what is different for everyone’s
   installs.
 * I have just released version 1.7.1 in it I do a manual check for if the wp_get_current_user
   function exists and if not then the Admin Localization (logged in administrators
   can view site as a selected locale) will not function.
 * Again sorry for the issues this caused!
 * > Matthew
 *  Thread Starter [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190768)
 * Hi mdbitz san,
 * Thanks
 * When Auto-update to 1.7.1, I got no errors.
 *  [pixelnated](https://wordpress.org/support/users/pixelnated/)
 * (@pixelnated)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190825)
 * thanks djeyewater & mdbitz

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘[Plugin: WordPress-Amazon-Associate]Auto-update failure’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-amazon-associate.svg)
 * [WordPress-Amazon-Associate](https://wordpress.org/plugins/wordpress-amazon-associate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-amazon-associate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-amazon-associate/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-amazon-associate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-amazon-associate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-amazon-associate/reviews/)

 * 15 replies
 * 12 participants
 * Last reply from: [pixelnated](https://wordpress.org/support/users/pixelnated/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-associateauto-update-failure/#post-2190825)
 * Status: resolved