Title: [Plugin: Pricing Table] is_dir error loading modules
Last modified: August 20, 2016

---

# [Plugin: Pricing Table] is_dir error loading modules

 *  [Brian JM](https://wordpress.org/support/users/brianfactor/)
 * (@brianfactor)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-pricing-table-is_dir-error-loading-mudules/)
 * The three load functions – load_styles, load_scripts, and load_modules produce
   errors on my server:
 * `Warning: is_dir() [function.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) )
       	wp_enqueue_style(uniqid(),$cssurl.$file);
       ```
   
 * OR
 *     ```
       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;    // *
               if(!is_dir($file)&&end(explode(".",$file))=='css')
       		wp_enqueue_style(uniqid(),$cssurl.$file);
           }
       }
       ```
   
 * Hope this helps y’all fix the problem.
 * [http://wordpress.org/extend/plugins/pricing-table/](http://wordpress.org/extend/plugins/pricing-table/)

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

 *  Thread Starter [Brian JM](https://wordpress.org/support/users/brianfactor/)
 * (@brianfactor)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-pricing-table-is_dir-error-loading-mudules/#post-2453313)
 * BTW, All of those functions are the in the `lib/class.plugin.php` file in case
   there was unclear.
 *  Plugin Author [Shahjada](https://wordpress.org/support/users/codename065/)
 * (@codename065)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-pricing-table-is_dir-error-loading-mudules/#post-2453391)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/pricing-table_ebf1e7.svg)
 * [Pricing Table](https://wordpress.org/plugins/pricing-table/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pricing-table/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pricing-table/)
 * [Active Topics](https://wordpress.org/support/plugin/pricing-table/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pricing-table/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pricing-table/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Shahjada](https://wordpress.org/support/users/codename065/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-pricing-table-is_dir-error-loading-mudules/#post-2453391)
 * Status: not resolved