Domain im Unterverzeichnis / Lightbox

  • Ahoi,

    so jetzt habe ich 1,5 Stunden im Code "gehackt" und eine halbe Stunde in Foren gesucht und bin nicht schlauer geworden.

    Mein Problem:
    Das Lightbox-Plugin (Version 0.6) für WP kann nicht gestartet werden. Die Fehlermeldung im Quelltext sieht so aus:

    ---
    <!-- Lightbox 0.6 Plugin: THERE WAS AN ERROR FINDING YOUR PLUGIN DIRECTORY -->
    <!-- I checked at: /usr/virtualweb/michelvalentino.com/lib/php/MV/wp-content/plugins/lightbox-plugin/ -->
    <!-- and also at: /usr/virtualweb/michelvalentino.com/lib/php/MV/wp-content/plugins/lightbox-plugin/ -->
    <!-- Go to 'Administration > Options > General' and try to fix the URL settings. -->
    ---

    Die URL lautet: http://www.michelvalentino.com
    Die Domain liegt in einem Unterordner: MV

    Wie es aussieht nutzt mein Provider einen virtuellen Server und die Domain wird auf ein entsprechendes Verzeichnis "gelinkt".

    Ich hätte ja schon längst aufgegeben, wenn ich es nicht schon einmal mit einer Seite, die leider nicht mehr online ist, hinbekommen hätte.

    Dieser Auszug aus der lightbox-plugin.php dürfte wohl dafür verantwortlich sein:

    ---
    $installURI = get_bloginfo('wpurl');
    $blogURI = get_bloginfo('url');

    // check for folder, based on current file.
    $found_dir = true;
    $hostdomain = getenv('HTTP_HOST');
    $filepath = getenv('SCRIPT_FILENAME');
    $filename = getenv('SCRIPT_NAME');
    $currentpath = str_replace($filename,'',$filepath);

    // first pass
    $lightbox_pluginpath = $installURI."/wp-content/plugins/lightbox-plugin/";
    $lightbox_dir = $currentpath.str_replace('http://'.getenv('http_host'),'',%24lightbox_pluginpath);
    ---

    Vermutlich ist dieser HTTP_Host Aufruf das Übel, dass die Probleme mit dem virtuellen Verzeichnis verursacht.

    Kann mir jemand helfen?

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • Lightbox lädt

    Nachdem ich nun durch weiteres Probieren Lightbox starten konnte, hier der geänderte Quelltext:

    ---
    $installURI = get_bloginfo('wpurl');
    $blogURI = get_bloginfo('url');

    // check for folder, based on current file.
    $found_dir = true;
    $hostdomain = getenv('HTTP_HOST');
    $filepath = getenv('SCRIPT_FILENAME');
    $filename = getenv('SCRIPT_NAME');
    $currentpath = str_replace($filename,'',$filepath);

    // first pass
    $lightbox_pluginpath = "/usr/virtualweb/michelvalentino.com/lib/php/http://www.michelvalentino.com/wp-content/plugins";
    $lightbox_dir = "./wp-content/plugins/lightbox-plugin";

    if(!is_dir($lightbox_dir)) // not a dir, not our path
    {
    $firstpass_dir = $lightbox_dir; // backup for errormsg

    $lightbox_pluginpath = "/usr/virtualweb/michelvalentino.com/lib/php/http://www.michelvalentino.com/MV/wp-content/plugins"; // new fallback path
    $lightbox_dir = "./MV/wp-content/plugins/lightbox-plugin"; // fallback path
    ---

    Funktionieren tut es aber dennoch nicht - und ja, ich habe nicht das rel="lightbox" Attribut vergessen!

    Bitte um Hiiilfe !!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!