• Hi!

    Thanks for such a great plugin, I do love it

    I’m having an issue with custom directories. no caches are ever created (and permissions are valid)

    define(‘MMR_CACHE_DIR’, WP_CONTENT_DIR . ‘/uploads/mmrcache’);
    define(‘MMR_CACHE_URL’, WP_CONTENT_URL . ‘/uploads/mmrcache’);

    Is there an issue preventing it from following a symlink possibly?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author launchinteractive

    (@launchinteractive)

    Perhaps. I’ve never tried a symlink’d directory. Can PHP read from the directory if you put something in it and list the contents?

    Thread Starter Jon Dingman

    (@jdingman)

    on a fresh install of WordPress, no symlinks

    Warning: mkdir(): No such file or directory in /var/www/fresh.localpi/htdocs/wp-content/plugins/merge-minify-refresh/merge-minify-refresh.php on line 115

    I get that error immediately upon activating and can’t get it to disappear

    Also, same result, it doesn’t process when the custom directory is defined.

    Plugin Author launchinteractive

    (@launchinteractive)

    That appears to be a permission issue. Does PHP have write access? What user:group is PHP running as?

    Thread Starter Jon Dingman

    (@jdingman)

    Yes, PHP has write access

    running www-data:www-data

    Plugin Author launchinteractive

    (@launchinteractive)

    Hmm, Does your uploads directory exist?

    Thread Starter Jon Dingman

    (@jdingman)

    Yes it does. I can upload files without issue

    Plugin Author launchinteractive

    (@launchinteractive)

    Any chance you can grant me access to your hosting so I can have a look? You can contact me here: https://launchinteractive.com.au/enquiry

    Thread Starter Jon Dingman

    (@jdingman)

    Unfortunately I cannot. First site is a cluster of servers and second is localhost

    Plugin Author launchinteractive

    (@launchinteractive)

    ok, are you able to add this line before line 115

    var_dump(MMR_CACHE_DIR); exit;

    and then check that all but the last directory exist.

    Thread Starter Jon Dingman

    (@jdingman)

    string(31) “WP_CONTENT_DIR/uploads/mmrcache”

    Thread Starter Jon Dingman

    (@jdingman)

    This is how I setup my config, do the constants for your plugin need to be at the bottom maybe?

    
    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) ) {
            define( 'ABSPATH', dirname( __FILE__ ) . '/' );
    }
    
    define('MMR_CACHE_DIR', WP_CONTENT_DIR . '/uploads/mmrcache');
    define('MMR_CACHE_URL', WP_CONTENT_URL . '/uploads/mmrcache');
    
    /** Sets up WordPress vars and included files. */
    require_once ABSPATH . 'wp-settings.php';
    
    Plugin Author launchinteractive

    (@launchinteractive)

    Ahh I see. WP_CONTENT_DIR doesn’t exist yet when your defining your path. Please try using an absolute path.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Custom directory not working’ is closed to new replies.