open_basedir

RazerRazer

Starking
Registriert
05.10.08
Beiträge
218
Hallo!

Kann mir jemand sagen, wie man den open_basedir an meinem Server ausschalten kann. Wäre sehr hilfreich!

Danke!
 

drlecter

Wöbers Rambur
Registriert
04.11.06
Beiträge
6.442
In der Apache Config vielleicht? php.ini ist auch immer hilfreich.
 

hillepille

Melrose
Registriert
19.07.09
Beiträge
2.508
hi, kommt dauf an wie php läuft. wenn php als apache-modul läuft dann geht das mit

php_admin_value open_basedir none in der httpd.conf. hier mal der auszug aus der php-hilfe

open_basedir string Limit the files that can be opened by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off.
When a script tries to open a file with, for example, fopen() or gzopen(), the location of the file is checked. When the file is outside the specified directory-tree, PHP will refuse to open it. All symbolic links are resolved, so it's not possible to avoid this restriction with a symlink. If the file doesn't exist then the symlink couldn't be resolved and the filename is compared to (a resolved) open_basedir.
The special value . indicates that the working directory of the script will be used as the base-directory. This is, however, a little dangerous as the working directory of the script can easily be changed with chdir().
In httpd.conf, open_basedir can be turned off (e.g. for some virtual hosts) the same way as any other configuration directive with "php_admin_value open_basedir none".
Under Windows, separate the directories with a semicolon. On all other systems, separate the directories with a colon. As an Apache module, open_basedir paths from parent directories are now automatically inherited.
The restriction specified with open_basedir is actually a prefix, not a directory name. This means that "open_basedir = /dir/incl" also allows access to "/dir/include" and "/dir/incls" if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: open_basedir = /dir/incl/
The default is to allow all files to be opened.
 

NightMare

Zuccalmaglios Renette
Registriert
09.11.04
Beiträge
263
öhm ist der server von nem hosting-anbieter? dann kannst du das normalerweise im servermanagementtool ausschalten...
ansonsten ist wie oben bereits beschrieben die httpd.conf der richtige ansatz...

grüsse
 

Slashwalker

Winterbanana
Registriert
15.05.06
Beiträge
2.213
php_admin_value open_basedir none sollte auch in einer .htaccess funktionieren, wenn ich mich nicht irre.