• Resolved kotpesgmail.com

    (@kotpesgmailcom)


    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/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Cliff Seal

    (@cliffseal)

    Sure! You need to modify your open_basedir setting in PHP: http://php.net/manual/en/ini.core.php#ini.open-basedir

    Thread Starter kotpesgmail.com

    (@kotpesgmailcom)

    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

    (@cliffseal)

    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

    (@kotpesgmailcom)

    Yes, sir

    Plugin Author Cliff Seal

    (@cliffseal)

    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

    (@kotpesgmailcom)

    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

    (@cliffseal)

    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

    (@kotpesgmailcom)

    Add /srv/www/affecto.dev/current/web/app/plugins/pardot/includes/ to my session.save_path, correct?

    Plugin Author Cliff Seal

    (@cliffseal)

    No, this error refers to open_basedir settings, so we need to adjust that.

    Thread Starter kotpesgmail.com

    (@kotpesgmailcom)

    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

    (@cliffseal)

    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

    (@kotpesgmailcom)

    yeah, it worked, but I don’t think I should go on production like that

    Plugin Author Cliff Seal

    (@cliffseal)

    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.