Title: Error on activating plugin
Last modified: August 24, 2016

---

# Error on activating plugin

 *  Resolved [tech_ppbh](https://wordpress.org/support/users/tech_ppbh/)
 * (@tech_ppbh)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-on-activating-plugin-3/)
 * Is there any way I can fix this error? The plugin activates, but when I click
   on JCH Optomize in the settings menu it gives me this:
 * Fatal error: Uncaught exception ‘UnexpectedValueException’ with message ‘FilesystemIterator::
   __construct(/usr/local/www/vhosts/davis_county/wp-content/cache/jch-optimize/)[
   [filesystemiterator.–construct](https://wordpress.org/support/topic/error-on-activating-plugin-3/filesystemiterator.--construct?output_format=md)]:
   failed to open dir: No such file or directory’ in /usr/local/www/vhosts/davis_county/
   wp-content/plugins/jch-optimize/options.php:625 Stack trace: #0 /usr/local/www/
   vhosts/davis_county/wp-content/plugins/jch-optimize/options.php(625): FilesystemIterator-
   >__construct(‘/usr/local/www/…’, 4096) #1 /usr/local/www/vhosts/davis_county/
   wp-content/plugins/jch-optimize/options.php(168): jch_get_cache_info() #2 [internal
   function]: jch_initialize_settings(”) #3 /usr/local/www/vhosts/davis_county/wp-
   includes/plugin.php(496): call_user_func_array(‘jch_initialize_…’, Array) #4 /
   usr/local/www/vhosts/davis_county/wp-admin/admin.php(216): do_action(‘load-settings_p…’)#
   5 /usr/local/www/vhosts/davis_county/wp-admin/options-general.php(10): require_once(‘/
   usr/local/www/…’) #6 {main} in /usr/local/www/vhosts/davis_county/wp-content/
   plugins/jch-optimize/options.php on line 625
 * any help is much appreciated!
 * [https://wordpress.org/plugins/jch-optimize/](https://wordpress.org/plugins/jch-optimize/)

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

 *  Plugin Author [codealfa](https://wordpress.org/support/users/codealfa/)
 * (@codealfa)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-on-activating-plugin-3/#post-6147631)
 * It seems the plugin is having some trouble creating or accessing the plugin’s
   cache folder on your server. Maybe you can try to create it manually and make
   sure the folder has correct permissions.
 * The plugin’s cache directory is at /wp-content/cache/jch-optimize/
 * Normally the permissions of the folder should be 755 but check with your host
   to confirm what permissions you need to set for the plugin to access this folder.
 *  Thread Starter [tech_ppbh](https://wordpress.org/support/users/tech_ppbh/)
 * (@tech_ppbh)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-on-activating-plugin-3/#post-6147787)
 * I created the folder like you said and it has 777 permissions, yet in the plugin
   page in wordpress admin it says “Error writing files to cache” at the top. Any
   other suggestions?
 * thanks for the quick response by the way.
 *  Plugin Author [codealfa](https://wordpress.org/support/users/codealfa/)
 * (@codealfa)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-on-activating-plugin-3/#post-6147810)
 * Did you check your host for assistance on this? This is more of a server issue
   because the plugin works on other servers. Check if there’s some restriction 
   on your server regarding plugins creating and saving files and folders on the
   server.
 *  Thread Starter [tech_ppbh](https://wordpress.org/support/users/tech_ppbh/)
 * (@tech_ppbh)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-on-activating-plugin-3/#post-6147828)
 * When I moved the site to a different server it worked just fine. Not sure why
   it didn’t work on the other one. Thanks for the help and the plugin!
 *  Plugin Author [codealfa](https://wordpress.org/support/users/codealfa/)
 * (@codealfa)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-on-activating-plugin-3/#post-6147831)
 * Ok great so this confirms what I was thinking about the server. Well happy to
   know it’s resolved.
 * Regards.
 *  [FINDbmx](https://wordpress.org/support/users/findbmx/)
 * (@findbmx)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-on-activating-plugin-3/#post-6147954)
 * Thank you!
 * I had the same problem (permission thing). the folder wasnt created so i created
   it manually and it was fixed.
 *  [hernandy](https://wordpress.org/support/users/hernandy/)
 * (@hernandy)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/error-on-activating-plugin-3/#post-6147976)
 * Created the folder manually didnt help, also tried chow user.
    Warning: Missing
   argument 7 for JchPlatformCache::requestFilesystemCredentials() in /var/www/mysite.
   com/wp-content/plugins/jch-optimize/platform/cache.php on line 225
 * it ask to input my ftp credential?

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

The topic ‘Error on activating plugin’ is closed to new replies.

 * ![](https://ps.w.org/jch-optimize/assets/icon-128x128.png?rev=1135491)
 * [JCH Optimize](https://wordpress.org/plugins/jch-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jch-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jch-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/jch-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jch-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jch-optimize/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [uncaught exception](https://wordpress.org/support/topic-tag/uncaught-exception/)

 * 7 replies
 * 4 participants
 * Last reply from: [hernandy](https://wordpress.org/support/users/hernandy/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/error-on-activating-plugin-3/#post-6147976)
 * Status: resolved