Title: fopen, fwrite, fclose errors?
Last modified: August 20, 2016

---

# fopen, fwrite, fclose errors?

 *  Resolved [Clicknathan](https://wordpress.org/support/users/clicknathan/)
 * (@clicknathan)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/fopen-fwrite-fclose-errors/)
 * I’m getting all of these errors when using the plugin:
 *     ```
       Warning: fopen(/usr/www/users/website/devsite/wp-content/plugins/latest-twitter-sidebar-widget/website.json) [function.fopen]: failed to open stream: Permission denied in/usr/www/users/website/devsite/wp-content/plugins/latest-twitter-sidebar-widget/latest_twitter_widget.phpon line 252
   
       Warning: fwrite() expects parameter 1 to be resource, boolean given in/usr/www/users/website/devsite/wp-content/plugins/latest-twitter-sidebar-widget/latest_twitter_widget.phpon line 253
   
       Warning: fclose() expects parameter 1 to be resource, boolean given in/usr/www/users/website/devsite/wp-content/plugins/latest-twitter-sidebar-widget/latest_twitter_widget.phpon line 254
       ```
   
 * The plugin still works, in that it shows everything off at the bottom, but those
   errors appear above it all. Any ideas?
 * [http://wordpress.org/extend/plugins/latest-twitter-sidebar-widget/](http://wordpress.org/extend/plugins/latest-twitter-sidebar-widget/)

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

 *  Plugin Author [Corey Salzano](https://wordpress.org/support/users/salzano/)
 * (@salzano)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/fopen-fwrite-fclose-errors/#post-3355140)
 * The clue in those warnings is `Permission denied in/usr/www/users/website/devsite/
   wp-content/plugins/latest-twitter-sidebar-widget/latest_twitter_widget.phpon 
   line 252`
 * The script does not have sufficient permissions on the server to read a file 
   in the same directory. I do not expect the plugin to work reliably if it cannot
   save a local copy of the twitter data.
 * You could try this fix that worked for some other users: [http://wordpress.org/support/topic/plugin-latest-twitter-sidebar-widget-only-json-showing?replies=3](http://wordpress.org/support/topic/plugin-latest-twitter-sidebar-widget-only-json-showing?replies=3)
 *  Thread Starter [Clicknathan](https://wordpress.org/support/users/clicknathan/)
 * (@clicknathan)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/fopen-fwrite-fclose-errors/#post-3355141)
 * Yeah my permissions were set to 755 (as you stated in the other thread). I had
   to change them to 777 in order to get it to work, which I don’t believe is all
   that desirable…what would you recommend?
 * Love the plugin otherwise, though, working wonderfully. 🙂
 *  Plugin Author [Corey Salzano](https://wordpress.org/support/users/salzano/)
 * (@salzano)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/fopen-fwrite-fclose-errors/#post-3355185)
 * I am torn about this. I have ran this plugin on a couple different shared hosting
   servers (HostGator, 1&1), and I have not had to change any permissions for it
   to operate. I agree that it sucks to have 777 permissions out there just to get
   some tweets on your sidebar.
 * I would like to rewrite the whole plugin to store the data in an option instead
   of a file on disk, but I can’t justify putting a lot of time into developing 
   for twitter anymore because they treat developers very poorly. (Surprise! That
   API you were using is gone, now!)
 *  Thread Starter [Clicknathan](https://wordpress.org/support/users/clicknathan/)
 * (@clicknathan)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/fopen-fwrite-fclose-errors/#post-3355186)
 * Yeah, I definitely feel you on Twitter’s attitude toward developers. That’s the
   whole reason I was using this plugin, as a quick fix since my old custom development
   died after they decided to change everything up so they can keep their data in
   their precious wall.
 * Thanks anyway, Corey!

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

The topic ‘fopen, fwrite, fclose errors?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/latest-twitter-sidebar-widget.svg)
 * [Latest twitter sidebar widget](https://wordpress.org/plugins/latest-twitter-sidebar-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/latest-twitter-sidebar-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/latest-twitter-sidebar-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/latest-twitter-sidebar-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/latest-twitter-sidebar-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/latest-twitter-sidebar-widget/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Clicknathan](https://wordpress.org/support/users/clicknathan/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/fopen-fwrite-fclose-errors/#post-3355186)
 * Status: resolved