• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

How include php-files from another domain

D

DadRover

Guest
I have Client and at the client some domains (more than ~100). How, from one domain include php-files from another domain with php-commands "require ()" which statement includes and evaluates the specific file?
ex:

body of file "somefile.php" from first domen (domen1.com)
<?php echo "Hello"; ?>

"index.php" file second domen (domen2.com)
<?php require ('../../domen.com/http/somefile.php');?>

Expected result domen2.com:
Hello
 
Hi
Most probably you should enable the access to the PHP scripts of another virtual host by configuring open_basedir directive where the new path value is redefined. To get it work with Plesk you will need to create a separate vhost.conf file in the $HTTPD_VHOSTS_D/domain.tld/conf/ directory. The directive should be like:
<Directory HTTPD_VHOSTS_D/domain.com/httpdocs>
php_admin_value open_basedir "HTTPD_VHOSTS_D/domain.com/httpdocs:/tmp:/"HTTPD_VHOSTS_D/domain2.com/httpdocs
</Directory>
After that you should run
/usr/local/psa/admin/sbin/websrvmng -v -a
to apply the changes. After that the script should be accessible, try.
 
Back
Top