Subdomain und Hauptdomain includen

Schumiel

Erfahrenes Mitglied
Hallo,

und zwar habe ich ein Linux-Server und da werden die Subdomains in ein extra Ordner "subdomains" erstellt. Wenn ich mit include von den Subdomains auf die Hauptdomain machen möchte, funktioniert das nicht. Da gibts ja wegen httpdocs extra Ordner.

Folgende Meldung wird angezeigt:
Code:
Warning: include() [function.include]: open_basedir restriction in effect. File(../../../httpdocs/xxx.php) is not within the allowed path(s): (/var/www/vhosts/xxx/subdomains/xxx/httpdocs:/tmp) in xxx on line 10

Warning: include(../../../httpdocs/xxx.php) [function.include]: failed to open stream: Operation not permitted in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/xxx.php on line 10

Warning: include() [function.include]: open_basedir restriction in effect. File(../../../httpdocsxxx.php) is not within the allowed path(s): (/var/www/vhosts/xxx/subdomains/xxx/httpdocs:/tmp) in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/xxx.php on line 10

Warning: include(../../../httpdocsxxx.php) [function.include]: failed to open stream: Operation not permitted in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/xxx.php on line 10

Warning: include() [function.include]: Failed opening '../../../httpdocs/xxx.php' for inclusion (include_path='.:') in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/xxx.php on line 10
 
Hallo,

und zwar habe ich ein Linux-Server und da werden die Subdomains in ein extra Ordner "subdomains" erstellt. Wenn ich mit include von den Subdomains auf die Hauptdomain machen möchte, funktioniert das nicht. Da gibts ja wegen httpdocs extra Ordner.

Folgende Meldung wird angezeigt:
Code:
Warning: include() [function.include]: open_basedir restriction in effect. File(../../../httpdocs/xxx.php) is not within the allowed path(s): (/var/www/vhosts/xxx/subdomains/xxx/httpdocs:/tmp) in xxx on line 10

Warning: include(../../../httpdocs/xxx.php) [function.include]: failed to open stream: Operation not permitted in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/xxx.php on line 10

Warning: include() [function.include]: open_basedir restriction in effect. File(../../../httpdocsxxx.php) is not within the allowed path(s): (/var/www/vhosts/xxx/subdomains/xxx/httpdocs:/tmp) in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/xxx.php on line 10

Warning: include(../../../httpdocsxxx.php) [function.include]: failed to open stream: Operation not permitted in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/xxx.php on line 10

Warning: include() [function.include]: Failed opening '../../../httpdocs/xxx.php' for inclusion (include_path='.:') in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/xxx.php on line 10

Versuche es mal mit, falls die Subdomains auch im gleichen vHost liegen :

PHP:
define ('__DIR_ROOT__', $_SERVER['DOCUMENT_ROOT']);

include (__DIR_ROOT__ . '/pfad/zur/subdomain/datei.php');
 
Zurück