Anmelden

Archiv verlassen und diese Seite im Standarddesign anzeigen : Usefulvid.com Umzug - brauche unterstützung



UsefulVid
10.07.2017, 07:40
Ich bin dabei meinen Wordpress Blog "umzuziehen"
Mein Problem ist, dass mein error_log in public_html innerhalb weniger Minuten auf ein paar GB anwächst nur mit einer Meldung:


[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613

Meine Idee war jetzt, dass ich bei contabo (ist auch mein derzeitiger provider) das Webspace Paket nehme, bei dem ich die Wordpress 1 Klick installation nutzen kann, also "managed wordpress".

Mein Problem ist jetzt, dass ich noch keinen guten Weg gefunden habe, wie ich die Daten (inklusive Bilder) aus dem alten Blog in den neuen übertragen kann.
Wenn ich Werkzeuge -> Export nutze werden scheinbar keine Bilder exportiert. Ich bekomme nur eine recht kleine xml Datei.
Wäre es ein gangbarer Weg einfach die xml zu exportieren, die one click installation zu starten, die xml zu importieren und den ordner wp_uploads per ftp zu kopieren?

Für Hilfe wäre ich sehr dankbar!

Nimbus
10.07.2017, 10:18
Meine Idee war jetzt, dass ich bei contabo (ist auch mein derzeitiger provider) das Webspace Paket nehme, bei dem ich die Wordpress 1 Klick installation nutzen kann, also "managed wordpress".


Kenne die genaue Situation bei Contabo nicht, aber One-Click-Installation ist in der Regel dann nicht automatisch "managed".


[10-Jul-2017 06:34:17 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/home4:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613

Dem Fehler kann ich entnehmen, dass deine Wordpress-Installation auf den Pfad "/" zugreifen möchte um ein Verzeichnis anzulegen. Instinktiv würde ich behaupten, dass eventuell irgendwo ein Pfad falsch konfiguriert ist. Vermutlich hat es irgendetwas mit einem Plugin/Theme zu tun.

Insgesamt glaube ich also, dass der Umzug vermutlich nicht die Lösung ist (mutmaßlich nicht managed und Fehler in Themes/Plugins, die du ja wieder nutzen wollen würdest).
Zur weiteren Diagnose fallen mir zwei Dinge ein.

Möglichkeit 1: Um die problematisches Stellen zu identifizieren Theme wechseln (eventuell hilft das schon und du siehst, dass es am Theme liegt). Sollte das nicht helfen, dann kannst du alle Plugins deaktivieren und nach und nach aktivieren und schauen, ob dein Problem zurückkehrt.

Möglichkeit 2: Die Zeile "debug_print_backtrace();" einfügen vor Zeile 1613 in der "wp-includes/functions.php". Dadurch lässt sich identifizieren wer für den Aufruf verantwortlich ist.

Das würde ich zumindest probieren. Wenn du natürlich einfach weiterhin umziehen möchtest: Aktuelle Wordpress-Versionen haben eine entsprechende Option um Medien zu exportieren. Alternativ kann man das glaube ich mit dem Plugin "WP Attachment Export" nachrüsten. In der XML die du aktuell hast sind vermutlich nur Refernzen zu den Bildern (dazu müssten glaube ich beide Blogs online sein)

UsefulVid
10.07.2017, 10:36
Ich habe Antwort von Contabo bekommen:


Dieses Problem tritt auf wenn eine Wordpress Installation migriert wurde und sich noch "hard-coded" Absolute Pfade im Code bzw. der Datenbank, die sich auf das alte System beziehen, befinden. Eine Anleitung wie man Wordpress Instanzen ohne in solche Problem zu laufen umziehen kann gibt es unter folgendem Link. https://codex.wordpress.org/Moving_WordPress

Die entsprechende Stelle in Ihrem Wordpress Code ist folgende.
# /home/kd29314/public_html/wp-includes/functions.php

$target = rtrim($target, '/');
if ( empty($target) )
$target = '/';

$target zeigt auf einen Pfad der auf dem Webspace Server nicht existiert, somit wird die Variable auf "/" gesetzt. Da / das root Verzeichnis des Servers ist, haben Sie dort natürlich keine Zugriffsrechte, weshalb dieser Fehler ausgegeben wird. Ein Workaround um diesen Fehler zu egalisieren wäre $target auf einen Pfad in Ihrem Homeverzeichnis zu setzen z.B. "/home/kd29314/public_html/". Das wird zumindest die Warning egalisieren, allerdings löst dies nicht das Hauptproblem und kann außerdem zu unerwartetem Verhalten der Wordpress Installation führen und ist somit nicht zu empfehlen.

Die Stelle hab ich erstmal geändert


$target = rtrim($target, '/');
if ( empty($target) )
$target = '/home/kd29314/public_html/';
Das hat nicht dazu geführt das weniger log geschrieben wird.




Möglichkeit 2: Die Zeile "debug_print_backtrace();" einfügen vor Zeile 1613 in der "wp-includes/functions.php". Dadurch lässt sich identifizieren wer für den Aufruf verantwortlich ist.


$target = rtrim($target, '/');
if ( empty($target) )
$target = '/home/kd29314/public_html/';

if ( file_exists( $target ) )
return @is_dir( $target );
debug_print_backtrace();
// We need to find the permissions of the parent folder that exists and inherit that.
$target_parent = dirname( $target );
while ( '.' != $target_parent && ! is_dir( $target_parent ) ) {
$target_parent = dirname( $target_parent );
}

// Get the permission bits.
if ( $stat = @stat( $target_parent ) ) {
$dir_perms = $stat['mode'] & 0007777;
} else {
$dir_perms = 0777;

edit:
in log steht auch nicht mehr.

Nimbus
10.07.2017, 11:00
Glaube die Erklärung von Contabo ist meiner Meinung nach falsch. Der betreffende Code entfernt (meiner Meinung nach und ich bin jetzt wirklich kein Experte in der WP Codebase) einfach nur den letzten Slash eines Pfades. Deine Ansatz zur Änderung mach in keiner Interpretation richtig Sinn :D

Hab mich vorhin bei der Zeilenangabe für das "debug_print_backtrace();" vertan. Angedacht hatte ich, dass es unter "function wp_mkdir_p( $target ) {" kommt. Allerdings scheint das unabhängig von der Stelle wohl verschluckt zu werden... Eventuell landet man mit Möglichkeit 1 doch schneller am Ziel :D

UsefulVid
10.07.2017, 16:54
Ich hab jetzt noch was entdeckt:

23611 /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/kd29314/public_html/index.php 28% 14
23609 /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/kd29314/public_html/index.php 27% 14
29572 /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/kd29314/public_html/wp-cron.php 27% 22
17957 /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/kd29314/public_html/wp-cron.php 23% 1
6104 /usr/sbin/httpd -k start 0% 281
22694 /usr/sbin/httpd -k start 0% 281
Siehe Datei im Anhang.
Das sind die Dateien die die höchste CPU last verursachen. Hilft das evtl weiter?

- - - - - - - - - - Beitrag nachträglich erweitert - - - - - - - - - -

Problem gelöst:

Offenbar lief der verantwortliche PHP-Prozess unkontrolliert in einer Dauerschleife. Wir haben den Prozess auf Systemebene beendet und das Problem scheint jetzt behoben zu sein. Es wurden keine neuen Einträge im PHP-Error-Log erfasst.

Nimbus
10.07.2017, 22:57
Kleine Info, falls es wen interessiert oder jemand ähnliche Probleme hat.
Ich habe mir das heute Mittag zusammen mit UsefulVid angeschaut. Bei der Suche nach der Ursache ist uns dann aufgefallen, dass sich die Zeilennummer nicht ändert selbst wenn wir die betreffende Zeile verschieben. Mein Verdacht war daher, dass sich im Hintergrund durchgehend ein Prozess mit der ursprünglichen Version des Files befindet. Mit diesem Hinweis war der Support wohl dann in der Lage das Problem zu beheben. Das ist besonders deshalb witzig (oder typisch?), weil von Contabo Seite nichts Hilfreiches kam, außer einer falschen Interpretation des Wordpress-Codes :D

Ghandy
10.07.2017, 23:53
Cool, danke Nimbus!