PHP Fehlermeldung nach Seitenaufbau

Bash, Shell, PHP, Python, Perl, CGI
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Hi !

Ich bekomm bei meinem Confixx, zwischendurch immer PHP Fehler wie

Code: Select all

Warning: Unknown(): open_basedir restriction in effect. File(/usr/local/apache2/htdocs/confixx/html/user/allgemein_start.php) is not within the allowed path(s): (/usr/local/apache2/htdocs/web1/) in Unknown on line 0

Warning: Unknown(/usr/local/apache2/htdocs/confixx/html/user/allgemein_start.php): failed to open stream: Operation not permitted in Unknown on line 0

Warning: (null)(): Failed opening '/usr/local/apache2/htdocs/confixx/html/user/allgemein_start.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0

Warning: Cannot modify header information - headers already sent in /usr/local/apache2/htdocs/confixx/html/user/auth.php on line 6

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/user/auth.php:6) in /usr/local/apache2/htdocs/confixx/html/user/auth.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/user/auth.php:6) in /usr/local/apache2/htdocs/confixx/html/user/auth.php on line 8

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/user/auth.php:6) in /usr/local/apache2/htdocs/confixx/html/user/auth.php on line 9
Wie kann ich diese Fehlermeldung weg bekommen ?

Danke

Bye Keule
arty
Userprojekt
Userprojekt
Posts: 729
Joined: 2002-06-12 10:11
Contact:
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by arty »

Saubere und korrekte Programmierung und Konfiguration von PHP.

bye
arty
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Habs nicht programmiert und es ist die Standart Konfiguration, die vor der Confixx Installation ohne Fehler lief *_*
arty
Userprojekt
Userprojekt
Posts: 729
Joined: 2002-06-12 10:11
Contact:
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by arty »

Wenn es die Standardkonfiguration wäre, würde es doch klappen, oder?

bye
arty
ego
Posts: 87
Joined: 2003-07-21 10:18
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by ego »

Stell mal include_path auf "." in deiner php.ini oder in den VHost Configs
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Immer noch

Code: Select all

Warning: Cannot modify header information - headers already sent in /usr/local/apache2/htdocs/confixx/html/user/auth.php on line 6

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/user/auth.php:6) in /usr/local/apache2/htdocs/confixx/html/user/auth.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/user/auth.php:6) in /usr/local/apache2/htdocs/confixx/html/user/auth.php on line 8

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/user/auth.php:6) in /usr/local/apache2/htdocs/confixx/html/user/auth.php on line 9
vevelt
Posts: 122
Joined: 2003-08-01 12:18
Location: Itzehoe
Contact:
 

Ich bin...

Post by vevelt »

...mir nicht sicher, aber du hast PHP 4.3.4 drauf, oder? Und Apache2?
Soweit ich weiss, gibt es dort momentan Probleme mit einer nicht übergebenen Variable. Mit PHP 4.3.5 soll das behoben sein...

Gruß, Sebastian.
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Hi !

Danke für den Tipp, ich probiers direkt mal aus.

Bye Nils
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Hat nicht gebracht :/

Code: Select all

Warning: Cannot modify header information - headers already sent in /usr/local/apache2/htdocs/confixx/html/reseller/auth.php on line 6

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/reseller/auth.php:6) in /usr/local/apache2/htdocs/confixx/html/reseller/auth.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/reseller/auth.php:6) in /usr/local/apache2/htdocs/confixx/html/reseller/auth.php on line 8

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/reseller/auth.php:6) in /usr/local/apache2/htdocs/confixx/html/reseller/auth.php on line 9
proportal.de
Posts: 5
Joined: 2004-02-06 19:35
Contact:
 

open_basedir kontrollieren

Post by proportal.de »

Hast Du Dir schonmal die Einstellung für's open_basedir angeschaut? Die eigentliche Fehlermeldung auf die man sich konzentrieren sollte ist

Code: Select all

Warning: Unknown(): open_basedir restriction in effect. File(/usr/local/apache2/htdocs/confixx/html/user/allgemein_start.php) is not within the allowed path

Warning: Unknown(/usr/local/apache2/htdocs/confixx/html/user/allgemein_start.php): failed to open stream: Operation not permitted in Unknown on line 0 

Warning: (null)(): Failed opening '/usr/local/apache2/htdocs/confixx/html/user/allgemein_start.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0 
und nicht die

Code: Select all

... headers already sent ...
Meldungen. Diese sind nur ein Seiteneffekt der durch die eigentlichen o.a. Warnungen entsteht.

Die Meldung besagt, dass die Datei auf die zugegriffen werden soll, nicht im oder unter dem open_basedir liegt. Dies wäre
beispielweise der Fall, wenn das open_basedir in Deinem Fall

Code: Select all

/usr/local/apache2/htdocs/undnocheins/
oder anders

Code: Select all

/www/
lauten würde.

Kontrolliere einfach mal das open_basedir.
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by oxygen »

Unter Apache muss jeder Vhost ein open_basedir haben, sonst kommt bekommen plötzlich Vhost die keinen haben, einen von den anderen.
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Code: Select all

DocumentRoot /usr/local/apache2/htdocs/confixx/html
steht in der httpd.conf und die Dateien sind auch in keinem Unterverzeichniss.
proportal.de
Posts: 5
Joined: 2004-02-06 19:35
Contact:
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by proportal.de »

Hi,

nicht das DocumentRoot. Das DocumentRoot bezeichnet das Rootverzeichnis der Domain,
ist jedoch nicht immer mit dem open_basedir identisch.

Schau mal unter http://de3.php.net/features.safe-mode nach. Dort findest Du Informationen
zum Umgang mit dem open_basedir.

In der vhost solltest Du einen Eintrag ähnlich

Code: Select all

<Directory /vhosts/domain.com/httpdocs/> 
php_admin_value safe_mode 1
php_admin_value open_basedir "/vhosts/domain.com/httpdocs/"
</Directory>
für das Confixx Verzeichnis haben.
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Nach open_base Dir Eintrag leider keine besserung :/
proportal.de
Posts: 5
Joined: 2004-02-06 19:35
Contact:
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by proportal.de »

Wie schaut die Einstellung den momentan aus?
Kannst Du mal den Confixx relevanten Teil posten?

Ist zwar eine dreckige Methode, aber Du könntest die auth.php mal in der ersten Zeile um

Code: Select all

die("open_basedir: '".ini_get("open_basedir")."'");
erweitern, damit würdest Du definitiv wissen, wie das open_basedir
beim Aufruf des Scripts gesetzt ist. Vielleicht ein Anhaltspunkt. Sei jedoch
vorsichtig beim basteln.
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Hi !

Danke für die Hilfe.

Haba ber im PHP Bugreport herausgefunden das es ein bekannter Bug ist.

Einfach

Code: Select all

php_admin_value open_basedir none
In die Virtual Host Sektion von Confixx und es leuft.

Bye Nils
proportal.de
Posts: 5
Joined: 2004-02-06 19:35
Contact:
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by proportal.de »

Gut zu wissen, kannst Du noch die URL vom Bugreport veröffenlichen?
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Hi !

Die Headerfehler sind auch einfach zu deaktivieren.

Einfach inder betreffenden Datei folgendes machen

Code: Select all

#header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
#header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
#header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
#header("Pragma: no-cache");                          // HTTP/1.0
jeweils ein # vor die 4 Werte, es sind auch keine Systemrelevanten Befehle, daher besteht kein Risiko.

Bei PHP5 tritt der open_basedir Bug auch auf.

Einfach wie bei PHP 4

Code: Select all

php_admin_value open_basedir none
In die Virtual Host Sektion von Confixx und es leuft.

Dafür hänge ich jetzt an einer anderen Fehlermeldung

Code: Select all

Warning: Cannot modify header information - headers already sent in /usr/local/apache2/htdocs/confixx/html/poplogin/allgemein_start.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/poplogin/allgemein_start.php:21) in /usr/local/apache2/htdocs/confixx/html/poplogin/allgemein_start.php on line 22
Die Header lassen sich leider nicht mit einem # deaktivieren, da sonst Webmail nicht mehr laüft :)

Code: Select all

if ($webmail_session == "") {
	$id = db_query("insert into webmail_session (pop3, password, lang, timestamp) VALUES ('$PHP_AUTH_USER', '".crypt($PHP_AUTH_PW, mkpasswd(2))."', '$shortlang', '".db_timestamp(time())."')");
	setcookie("webmail_session", db_insert_id($id, 'seq_webmail_session'), 0, "/cgi-bin/webmail/");
	setcookie("webmail_pass", $PHP_AUTH_PW, 0, "/cgi-bin/webmail/");
Betrifft es.
proportal.de
Posts: 5
Joined: 2004-02-06 19:35
Contact:
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by proportal.de »

Das liegt daran, das ein Script bereits vor den header() Kommandos etwas an den Client
geschickt hat. Was steht vor den

Code: Select all

Warning: Cannot modify header  .....
Zeilen?
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Nichts, nur das was ich geposted hab.

Warum der Fehler kommt ist klar :)
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

Recoilmaster wrote:
Dafür hänge ich jetzt an einer anderen Fehlermeldung

Code: Select all

Warning: Cannot modify header information - headers already sent in /usr/local/apache2/htdocs/confixx/html/poplogin/allgemein_start.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/confixx/html/poplogin/allgemein_start.php:21) in /usr/local/apache2/htdocs/confixx/html/poplogin/allgemein_start.php on line 22
Die Header lassen sich leider nicht mit einem # deaktivieren, da sonst Webmail nicht mehr laüft :)

Code: Select all

if ($webmail_session == "") {
	$id = db_query("insert into webmail_session (pop3, password, lang, timestamp) VALUES ('$PHP_AUTH_USER', '".crypt($PHP_AUTH_PW, mkpasswd(2))."', '$shortlang', '".db_timestamp(time())."')");
	setcookie("webmail_session", db_insert_id($id, 'seq_webmail_session'), 0, "/cgi-bin/webmail/");
	setcookie("webmail_pass", $PHP_AUTH_PW, 0, "/cgi-bin/webmail/");
Betrifft es.
Hat einer eine Idee ?
conym18
Posts: 137
Joined: 2003-01-21 12:41
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by conym18 »

zeig doch mal das script?
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by recoilmaster »

allgemein_start.php von Confixx 2.0 die betroffene Zeile steh 1 Beitrag höher.

Bye Nils
conym18
Posts: 137
Joined: 2003-01-21 12:41
 

Re: PHP Fehlermeldung nach Seitenaufbau

Post by conym18 »

hi,

ich kenne es so, das man erst den header (also cookie) führen muß und dann denn rest. (noch vor dem <html>)


conym18
Post Reply