Support » Plugin: Pricing Table » [Plugin: Pricing Table] is_dir error loading modules

  • The three load functions – load_styles, load_scripts, and load_modules produce errors on my server:

    Warning: is_dir() []: open_basedir restriction in effect. File(..) is not within the allowed path(s): (/var/www/<MY WEBSITE>/httpdocs:/tmp) in /var/www/<MY WEBSITE>/httpdocs/wp-content/plugins/pricing-table/libs/class.plugin.php on line 29
    [and also 27 and forty-something]

    It seems to me that the problem is that the function scours the directory and messes up is_dir when feeding it the .. directory.

    This error is actually extremely easy to fix. I just added if ($file == '..') continue; But I have a suspicion you could just switch the extension evaluation and the directory test:

    if( end(explode(".",$file))=='css' && !is_dir($file) )


    function load_styles(){
        $dir = is_admin()?'admin':'site';
        $cssdir = $this->plugin_dir.'/css/'.$dir.'/';
        $cssurl = $this->plugin_url.'/css/'.$dir.'/';
        $files = scandir($cssdir);
        foreach($files as $file){
    	if ($file == '..')   // * Added lines
    		continue;    // *

    Hope this helps y’all fix the problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • BTW, All of those functions are the in the lib/class.plugin.php file in case there was unclear.

    Plugin Author Shaon


    Hello Brian, thanks for your your help. I’m clearing this and updating asap.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Pricing Table] is_dir error loading modules’ is closed to new replies.