Sure! You need to modify your open_basedir
setting in PHP: http://php.net/manual/en/ini.core.php#ini.open-basedir
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
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?
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.
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
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.
Add /srv/www/affecto.dev/current/web/app/plugins/pardot/includes/
to my session.save_path, correct?
No, this error refers to open_basedir
settings, so we need to adjust that.
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)
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. :/
yeah, it worked, but I don’t think I should go on production like that
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.