One of my clients just started getting this error [she said it happened right after duplicating a resource]:
Warning: file_exists(): open_basedir restriction in effect. File(/root/.aws/sdk/config.inc.php) is not within the allowed path(s): (/tmp:/var/www/vhosts/domain.com/httpdocs:/var/www/vhosts/domain.com) in /var/www/vhosts/domain.com/core/model/aws/sdk.class.php on line 27
the code looks good, at least it exists in several other modx installations:
/*%******************************************************************************************%*/
// CORE DEPENDENCIES
// Look for include file in the same directory (e.g. `./config.inc.php`).
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc.php'))
{
include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc.php';
}
// Fallback to `~/.aws/sdk/config.inc.php`
elseif (getenv('HOME') && file_exists(getenv('HOME') . DIRECTORY_SEPARATOR . '.aws' . DIRECTORY_SEPARATOR . 'sdk' . DIRECTORY_SEPARATOR . 'config.inc.php'))
{
include_once getenv('HOME') . DIRECTORY_SEPARATOR . '.aws' . DIRECTORY_SEPARATOR . 'sdk' . DIRECTORY_SEPARATOR . 'config.inc.php';
}
the basedir checks out [/core/ is above the web root]:
/tmp:/var/www/vhosts/domain.com/httpdocs:/var/www/vhosts/domain.com
the alarming thing is that it's trying to look in /root/

huh? why? there is no config.inc.php or .aws/ anywhere where it is trying to look.
What's going on here? any ideas?