Probleme bei PHP (und Smarty)

G

gruber99

Mitglied
hallo,

bitte um eure hilfe

ich habe smarty runtergeladen und auf folgende directory kopiert:
/home/httpd/vhosts/xxxxx.com/Smarty/

anschließend habe ich die directories erstellt und die Rechte (chmod 777) vergeben:
-rw-r--r-- 1 root root 12747 Mar 9 20:44 Config_File.class.php
-rw-r--r-- 1 root root 63206 Mar 9 20:44 Smarty.class.php
-rw-r--r-- 1 root root 91221 Mar 9 20:44 Smarty_Compiler.class.php
drwxrwxrwx 2 web0 root 1024 Mar 9 20:46 cache
drwxr-xr-x 2 root root 1024 Mar 9 20:46 configs
-rw-r--r-- 1 root root 5066 Mar 9 20:44 debug.tpl
drwxr-xr-x 2 root root 1024 Mar 9 20:44 internals
drwxr-xr-x 2 root root 2048 Mar 9 20:44 plugins
drwxr-xr-x 2 root root 1024 Mar 9 20:46 templates
drwxrwxrwx 2 web0 root 1024 Mar 9 20:46 templates_c

außerdem habe ich in der php.ini die open_basedir und include_path gesetzt auf (und den server gestartet): open_basedir = "/home/httpd/vhosts/xxxxx.com/Smarty"
include_path = ".:/home/httpd/vhosts/xxxxx.com/Smarty"

danach habe ich ein test.php file erstellt:
<?php
require('/home/httpd/vhosts/gutekueche.at/Smarty/Smarty.class.php');
# auch so funktioniert nicht require('Smarty.class.php');
?>
im directory:
/home/httpd/vhosts/xxxxx.com/httpdocs/test.php

leider bekomme ich noch folgende meldung:
Warning: main(): open_basedir restriction in effect. File(/home/httpd/vhosts/xxxxx.com/Smarty/Smarty.class.php) is not within the allowed path(s): (/home/httpd/vhosts/xxxxx.com/httpdocs:/tmp) in /home/httpd/vhosts/xxxxx.com/httpdocs/test.php on line 3
Warning: main(/home/httpd/vhosts/xxxxx.com/Smarty/Smarty.class.php): failed to open stream: Operation not permitted in /home/httpd/vhosts/xxxxx.com/httpdocs/test.php on line 3
Fatal error: main(): Failed opening required '/home/httpd/vhosts/xxxxx.com/Smarty/Smarty.class.php' (include_path='.:') in /home/httpd/vhosts/xxxxx.com/httpdocs/test.php on line 3


was mache ich den falsch ?

bitte um eure hilfe ....
 
Hi gruber99,

das Problem ist, dass /home/httpd/vhosts/xxxxx.com/ nicht als open_basedir definiert wurde, d.h. PHP darf nicht auf dieses Verzeichnis und alle Unterverzeichnisse (ausgeschlossen httpdocs) zugreifen. Anscheinend liegen alle Daten, die über HTTP abgerufen werden können in dem Verzeichnis httpdocs. Verschiebe mal das Verzeichnis Smart in das Verzeichnis /home/httpd/vhosts/xxxxx.com/httpdocs/ und versuche es nochmal.

MfG,
iRadiaX
 

Ähnliche Themen

Samba 4 Gast Zugang unter Ubuntu funktioniert nicht

Rechte beim Anlegen von Dateien via Samba-Client nicht korrekt gesetzt

Falsche Rechte gesetzt beim Anlegen von Ordnern via Samba-Client

Windows clients können nicht mehr auf lange laufendes System zugreifen

OpenSUSE 12.1: Gnucash startet nicht mehr

Zurück
Oben