Title: wp-load.php
Last modified: August 30, 2016

---

# wp-load.php

 *  Resolved [kotpesgmail.com](https://wordpress.org/support/users/kotpesgmailcom/)
 * (@kotpesgmailcom)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/)
 * Hi. I went through similar issues and added the absolute path to my wp-load.php
   file in includes/pardon-custom-wp-load.php. Now it loads stuff from Pardot, but
   I still get 2 error message at the top of it:
 *     ```
       Warning: file_exists(): open_basedir restriction in effect. File(/srv/wp-load.php) is not within the allowed path(s): (/srv/www/:/tmp) in /srv/www/affecto.dev/current/web/app/plugins/pardot/includes/pardot-wp-loader.php on line 22
   
       Warning: file_exists(): open_basedir restriction in effect. File(/srv/wp-load.php) is not within the allowed path(s): (/srv/www/:/tmp) in /srv/www/affecto.dev/current/web/app/plugins/pardot/includes/pardot-wp-loader.php on line 30
       ```
   
 * Help is greatly appreciated!
 * [https://wordpress.org/plugins/pardot/](https://wordpress.org/plugins/pardot/)

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

 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654599)
 * Sure! You need to modify your `open_basedir` setting in PHP: [http://php.net/manual/en/ini.core.php#ini.open-basedir](http://php.net/manual/en/ini.core.php#ini.open-basedir)
 *  Thread Starter [kotpesgmail.com](https://wordpress.org/support/users/kotpesgmailcom/)
 * (@kotpesgmailcom)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654602)
 * I don’t understand why it says `File(/srv/wp-load.php)` if my wp-load.php is 
   in `/srv/www/affecto.dev/current/web/wp`
    `session.save_path = /tmp` This is 
   how my session.save_path looks like
 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654603)
 * So, the entire contents of your `pardot-custom-wp-load.php` file is:
 * `define('PARDOT_WP_LOAD', '/srv/www/affecto.dev/current/web/wp/wp-load.php');`
 * …correct?
 *  Thread Starter [kotpesgmail.com](https://wordpress.org/support/users/kotpesgmailcom/)
 * (@kotpesgmailcom)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654604)
 * Yes, sir
 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654607)
 * I wonder if the trailing slash in /srv/www/ is causing this, since that can indicate
   only allowing loading from a specified directory. Perhaps adding `:/srv/www/affecto.
   dev/current/web/wp/` to your allowed paths in `open_basedir` would do the trick.
 *  Thread Starter [kotpesgmail.com](https://wordpress.org/support/users/kotpesgmailcom/)
 * (@kotpesgmailcom)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654613)
 * I get exactly same error. Im concerned about this part of the error message `
   File(/srv/wp-load.php)` this is not the correct path
 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654617)
 * Ah, I missed that this was borking on the `file_exists` call. Try adding the 
   includes directory that houses the `pardot-custom-wp-load.php` file itself and
   restart PHP again.
 *  Thread Starter [kotpesgmail.com](https://wordpress.org/support/users/kotpesgmailcom/)
 * (@kotpesgmailcom)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654619)
 * Add `/srv/www/affecto.dev/current/web/app/plugins/pardot/includes/` to my session.
   save_path, correct?
 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654620)
 * No, this error refers to `open_basedir` settings, so we need to adjust that.
 *  Thread Starter [kotpesgmail.com](https://wordpress.org/support/users/kotpesgmailcom/)
 * (@kotpesgmailcom)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654636)
 * Ok, this is what I get right now:
 *     ```
       Warning: file_exists(): open_basedir restriction in effect. File(/srv/wp-load.php) is not within the allowed path(s): (/srv/www/:/tmp:/srv/www/affecto.dev/current/web/app/plugins/pardot/includes/) in /srv/www/affecto.dev/current/web/app/plugins/pardot/includes/pardot-wp-loader.php on line 22
   
       Warning: file_exists(): open_basedir restriction in effect. File(/srv/wp-load.php) is not within the allowed path(s): (/srv/www/:/tmp:/srv/www/affecto.dev/current/web/app/plugins/pardot/includes/) in) in /srv/www/affecto.dev/current/web/app/plugins/pardot/includes/pardot-wp-loader.php on line 30
       ```
   
 * Which is I know wrong (the open_basedir), but the problem is in `File(/srv/wp-
   load.php)`
 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654640)
 * Sure, something’s causing `dirname( __FILE__ )` to look in /srv/, which is not
   open to `open_basedir` settings. Only remaining option I see without knowing 
   more is to whitelist that /srv/ directory as well. :/
 *  Thread Starter [kotpesgmail.com](https://wordpress.org/support/users/kotpesgmailcom/)
 * (@kotpesgmailcom)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654650)
 * yeah, it worked, but I don’t think I should go on production like that
 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654736)
 * Gotcha. At this point, it looks like it’s a server configuration setting, and
   not so much a thing with the plugin. I know other folks have used it without 
   the same issues, so I’m going to close this for now. Let me know if there’s anything
   else I can do to help.

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

The topic ‘wp-load.php’ is closed to new replies.

 * ![](https://ps.w.org/pardot/assets/icon-256x256.png?rev=2995205)
 * [Account Engagement](https://wordpress.org/plugins/pardot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pardot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pardot/)
 * [Active Topics](https://wordpress.org/support/plugin/pardot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pardot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pardot/reviews/)

## Tags

 * [wp-load.php](https://wordpress.org/support/topic-tag/wp-load-php/)

 * 13 replies
 * 2 participants
 * Last reply from: [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/wp-loadphp/#post-6654736)
 * Status: resolved