Support » Plugin: Nginx Helper » Constant RT_WP_NGINX_HELPER_CACHE_PATH already defined

  • Hi,
    I’m setting my custom cache path with:

    define( 'RT_WP_NGINX_HELPER_CACHE_PATH', 'custom-path' );

    But I’m getting:

    PHP Notice: Constant RT_WP_NGINX_HELPER_CACHE_PATH already defined

    Looking at the plugin code, I see:

    		if ( ! defined( 'RT_WP_NGINX_HELPER_CACHE_PATH' ) ) {
    			define( 'RT_WP_NGINX_HELPER_CACHE_PATH', '/var/run/nginx-cache' );
    		}

    And I think this is the origin of the problem.
    So how I can define a custom cache path since mine is not /var/run/nginx-cache?

    Thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter Sergio de Falco

    (@sgr33n)

    Defining it at the very beginning looks like solved the problem but I’d like to define it inside a plugin, could you explain what is the correct hook to define it?

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Constant RT_WP_NGINX_HELPER_CACHE_PATH already defined’ is closed to new replies.