symlink
symlink

Reputation: 12218

Include PHP file on same server, different domains

I get a 503 error when calling an include statement to another domain on my PLESK server in ModX e.g.

if (!@include_once (MODX_CORE_PATH . "model/modx/modx.class.php")){
    //throw 503 error
}

Is this a CORS issue, or is something else making this if statement fail?

Thanks in Advance.

Upvotes: 0

Views: 1658

Answers (1)

Sean Kimball
Sean Kimball

Reputation: 4494

You need to update your open_basedir setting in plesk to allow domain1 access to domain2's directory structure:

http://php.net/manual/en/ini.core.php#ini.open-basedir

Depending on your host you may not be able to do this ~ quite likely not, that would be a pretty huge security problem. [in effect you could access & manipulate files on any domain on the server just by editing this setting]

Upvotes: 1

Related Questions