Title: Relative path in Integrations.php causing error
Last modified: July 28, 2021

---

# Relative path in Integrations.php causing error

 *  Resolved [Micemade](https://wordpress.org/support/users/anydog/)
 * (@anydog)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/relative-path-in-integrations-php-causing-error/)
 * Hi,
 * It seems that usage of the relative path in plugin’s includes/integrations/Integrations.
   php file is causing errors with is_readable() method. The code:
 *     ```
       private function load_integrations() {
   
       	$registered_integrations = array(
       		'WC_Facebook_WPML_Injector' => '/includes/fbwpml.php',
       		Bookings::class             => '/includes/Integrations/Bookings.php',
       	);
   
       	foreach ( $registered_integrations as $class_name => $path ) {
   
       		if ( ! class_exists( $class_name ) && ! is_readable( $path ) ) {
   
       			$this->integrations[ $class_name ] = $this->plugin->load_class( $path, $class_name );
       			}
       		}
       	}
       ```
   
 * Error notice:
    `FastCGI sent in stderr: "PHP message: PHP Warning: is_readable():
   open_basedir restriction in effect. File(/includes/fbwpml.php) is not within 
   the allowed path(s): (/www/OUR_SITE/public:/www/OUR_SITE/mysqleditor:/www/OUR_SITE/
   web:/www/OUR_SITE/deploy:/www/OUR_SITE/deployment:/www/OUR_SITE/deployments:/
   usr/share:/tmp) in /www/OUR_SITE/public/wp-content/plugins/facebook-for-woocommerce/
   includes/Integrations/Integrations.php on line 61" while reading response header
   from upstream, client: 89.201.230.203, server: OUR_SITE_URL, request: "POST /?
   wc-ajax=get_refreshed_fragments HTTP/1.0", upstream: "fastcgi://unix:/var/run/
   php7.4-fpm-OUR_SITE.sock:", host: "OUR_SITE_URL", referrer: "OUR_SITE_URL"`
 * Where **OUR_SITE** and **OUR_SITE_URL** represent site name and site URL, respectively.
 * Could your developers fix the relative paths for the next plugin update using**
   plugin_dir_path( __DIR__ )**, for example:
 * `'WC_Facebook_WPML_Injector' => plugin_dir_path( __DIR__ ) . 'includes/fbwpml.
   php'`
    ,or similar solution, please?
 * Thanks
    -  This topic was modified 4 years, 10 months ago by [Micemade](https://wordpress.org/support/users/anydog/).
    -  This topic was modified 4 years, 10 months ago by [Micemade](https://wordpress.org/support/users/anydog/).

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

 *  [Shohan Hossain Nabil – a11n](https://wordpress.org/support/users/sohanhossain/)
 * (@sohanhossain)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/relative-path-in-integrations-php-causing-error/#post-14713414)
 * Hello [@anydog](https://wordpress.org/support/users/anydog/),
 * > It seems that usage of the relative path in plugin’s includes/integrations/
   > Integrations.php file is causing errors with is_readable() method.
 * Thanks for reporting the problem. This has been already reported in GitHub [here](https://github.com/woocommerce/facebook-for-woocommerce/issues/1642)
   and is being looked at by our development team.
    Also, there’s a solution given
   in the thread that you can use as a temporary fix for now.
 * Thanks.
 *  Thread Starter [Micemade](https://wordpress.org/support/users/anydog/)
 * (@anydog)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/relative-path-in-integrations-php-causing-error/#post-14715766)
 * [@sohanhossain](https://wordpress.org/support/users/sohanhossain/) Thank you 
   for your fast reply and link to Github issues page.
    The solution there seems
   to be working.
 *  [Joao D – a11n](https://wordpress.org/support/users/johnlud/)
 * (@johnlud)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/relative-path-in-integrations-php-causing-error/#post-14717143)
 * Hi [@anydog](https://wordpress.org/support/users/anydog/)
 * > Thank you for your fast reply and link to Github issues page.
   >  The solution
   > there seems to be working.
 * I’m glad to hear that!
 * This thread will be marked as resolved. If you have any further questions, please
   don’t hesitate to contact us again.
    -  This reply was modified 4 years, 10 months ago by [Joao D - a11n](https://wordpress.org/support/users/johnlud/).

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

The topic ‘Relative path in Integrations.php causing error’ is closed to new replies.

 * ![](https://ps.w.org/facebook-for-woocommerce/assets/icon.svg?rev=3469606)
 * [Meta for WooCommerce](https://wordpress.org/plugins/facebook-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/facebook-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook-for-woocommerce/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Joao D – a11n](https://wordpress.org/support/users/johnlud/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/relative-path-in-integrations-php-causing-error/#post-14717143)
 * Status: resolved