• Resolved harryfear

    (@harryfear)


    Hello!

    My PHP error file is full of this:

    PHP Warning: is_readable(): open_basedir restriction in effect. File(C:\inetpub\vhosts\censored-domain.com\www.censored-domain.com\blog/wp-content/plugins/C:\inetpub\vhosts\censored-domain.com\www.censored-domain.com\blog\wp-content\plugins\xml-sitemap-feed/languages/xml-sitemap-feed-en_US.mo) is not within the allowed path(s): (C:/Inetpub/vhosts//censored-domain.com\;C:\Windows\Temp\) in C:\inetpub\vhosts\censored-domain.com\www.censored-domain.com\blog\wp-includes\l10n.php on line 583

    Any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, it looks like you’re on a Windows server. Correct? Is this happening only with “xml-sitemap-feed” in that path or are there other plugin or theme paths referenced in the error log file too?

    In any case, it seems there is a double path there in that error. Not sure why that happens. Maybe PHP on Windows interprets dirname() differently than on Linux.

    Could you edit the file xml-sitemap-feed/includes/class-xmlsitemapfeed.php where you can find on line 1324 (search for “function plugins_loaded”, it’s the line 3 lines below that) this part: dirname( dirname( __FILE__ ) )

    Replace that part with dirname( XMLSF_PLUGIN_BASENAME ) so it will look like:

    
    	public function plugins_loaded() {
    		// TEXT DOMAIN
    		if ( is_admin() ) { // text domain needed on admin only
    			load_plugin_textdomain('xml-sitemap-feed', false, dirname( XMLSF_PLUGIN_BASENAME ) . '/languages' );
    		}
    	}
    

    This is the way it will be implemented in the next release.

    Thread Starter harryfear

    (@harryfear)

    Yes, it’s Plesk on Windows. Yuck!

    Made that change…

    Before:

    	public function plugins_loaded()	{
    		// TEXT DOMAIN
    		if ( is_admin() ) { // text domain needed on admin only
    			load_plugin_textdomain('xml-sitemap-feed', false, dirname( dirname( __FILE__ ) ) . '/languages' );
    		}
    	}

    After:

    	public function plugins_loaded() {
    		// TEXT DOMAIN
    		if ( is_admin() ) { // text domain needed on admin only
    			load_plugin_textdomain('xml-sitemap-feed', false, dirname( XMLSF_PLUGIN_BASENAME ) . '/languages' );
    		}
    	}

    Hooray that solved it!

    Thanks very much!

    BTW, Amazing plugin: I use this plugin because it’s the only one I tested that I can easily check ‘exclude from sitemap’ on posts. All the best.

    Good to hear and thanks for the feedback ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Dodgy Folder Reference? Language file?’ is closed to new replies.