Archives FluxBB.fr

Les archives de FluxBB.fr

Vous n'êtes pas identifié(e).

#1 17-04-2007 13:11:27

Fly
Membre

Allowed memory size of

Bonjour, je vient de remarqué qu'en me rendant dans le menu signalement du panneau d'admin, j'ai une erreur:

Info

Erreur. Le lien que vous avez suivi est incorrect ou périmé.

Retour
Info

Erreur. Le lien que vous avez suivi est incorrect ou périmé.

Retour
Info

Erreur. Le lien que vous avez suivi est incorrect ou périmé.

Retour

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 40961 bytes) in /home/flyreunion/www/forum/footer.php on line 37

Voila le footer.php

<?php
/***********************************************************************

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/


// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;

$tpl_temp = trim(ob_get_contents());
$tpl_main = str_replace('<pun_main>', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <pun_main>


// START SUBST - <pun_footer>
ob_start();

?>
<div id="brdfooter" class="block">
    <h2><span><?php echo $lang_common['Board footer'] ?></span></h2>
    <div class="box">
        <div class="inbox">
<?php

// If no footer style has been specified, we use the default (only copyright/debug info)
$footer_style = isset($footer_style) ? $footer_style : NULL;


/* Start MOD PM */
if ($footer_style == 'pms_list')
{
?>
            <dl id="searchlinks" class="conl">
                <dt><strong>Liens messages privés</strong></dt>
<?php
if ($num_new_mp > 0)
    echo "\t\t\t\t\t\t".'<dd><a href="pms_list.php?action=markall&box='.$box.'&p='.$p.'">'.$lang_pms['Mark all'].'</a></dd>'."\n";
    
    echo '</dl>';
}
/* End MOD PM */

if ($footer_style == 'index' || $footer_style == 'search')
{
    if (!$pun_user['is_guest'])
    {
        echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt>'."\n\t\t\t\t".'<dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
        echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n";

        if ($pun_config['o_subscriptions'] == '1')
            echo "\t\t\t\t".'<dd><a href="search.php?action=show_subscriptions">'.$lang_common['Show subscriptions'].'</a></dd>'."\n";

        echo "\t\t\t\t".'<dd><a href="search.php?action=show_user&user_id='.$pun_user['id'].'">'.$lang_common['Show your posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
    }
    else
    {
        if ($pun_user['g_search'] == '1')
        {
            echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt><dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
            echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
        }
    }
}
else if ($footer_style == 'viewforum' || $footer_style == 'viewtopic')
{
    echo "\n\t\t\t".'<div class="conl">'."\n";

    // Display the "Jump to" drop list
    if ($pun_config['o_quickjump'] == '1')
    {
        // Load cached quickjump
        @include PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
        if (!defined('PUN_QJ_LOADED'))
        {
            require_once PUN_ROOT.'include/cache.php';
            generate_quickjump_cache($pun_user['g_id']);
            require PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
        }
    }

    if ($footer_style == 'viewforum' && $is_admmod)
        echo "\t\t\t".'<p id="modcontrols"><a href="moderate.php?fid='.$forum_id.'&p='.$p.'">'.$lang_common['Moderate forum'].'</a></p>'."\n";
    else if ($footer_style == 'viewtopic' && $is_admmod)
    {
        echo "\t\t\t".'<dl id="modcontrols"><dt><strong>'.$lang_topic['Mod controls'].'</strong></dt><dd><a href="moderate.php?fid='.$forum_id.'&tid='.$id.'&p='.$p.'">'.$lang_common['Delete posts'].'</a></dd>'."\n";
        echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&move_topics='.$id.'">'.$lang_common['Move topic'].'</a></dd>'."\n";

        if ($cur_topic['closed'] == '1')
            echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&open='.$id.'">'.$lang_common['Open topic'].'</a></dd>'."\n";
        else
            echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&close='.$id.'">'.$lang_common['Close topic'].'</a></dd>'."\n";

        if ($cur_topic['sticky'] == '1')
            echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&unstick='.$id.'">'.$lang_common['Unstick topic'].'</a></dd></dl>'."\n";
        else
            echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&stick='.$id.'">'.$lang_common['Stick topic'].'</a></dd></dl>'."\n";
    }

    echo "\t\t\t".'</div>'."\n";
}

?>
          <p class="conr">Propulsé par <a href="http://www.punbb.org/">PunBB</a><?php if ($pun_config['o_show_version'] == '1') echo ' '.$pun_config['o_cur_version']; ?><br />© Copyright 2002–2005 Rickard Andersson<br /> Traduction par <a href="http://www.punbb.fr/">punbb.fr</a></p>
<?php

// Display debug info (if enabled/defined)
if (defined('PUN_DEBUG'))
{
    // Calculate script generation time
    list($usec, $sec) = explode(' ', microtime());
    $time_diff = sprintf('%.3f', ((float)$usec + (float)$sec) - $pun_start);
    echo "\t\t\t".'<p class="conr">[ Générée en '.$time_diff.' sec., '.$db->get_num_queries().' requêtes exécutées ]</p>'."\n";
}

?>
            <div class="clearer"></div>
        </div>
    </div>
</div>
<?php


// End the transaction
$db->end_transaction();

// Display executed queries (if enabled)
if (defined('PUN_SHOW_QUERIES'))
    display_saved_queries();

$tpl_temp = trim(ob_get_contents());
$tpl_main = str_replace('<pun_footer>', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <pun_footer>

/* Début - Empêcher la duplication des adresses */

// URL Rewriting ?
$pattern_in = 'viewtopic.php?pid=<PID>';
$pattern_out = 'viewtopic.php?id=<ID>&p=<P>';

// On commence par récupérer les pid de tous les liens qui appellent un message précis
preg_match_all('#'.str_replace('\<PID\>', '([0-9]+)', preg_quote($pattern_in, '#')).'#', $tpl_main, $pids);
$pids = array_unique($pids[1]);

if(!empty($pids)) {

    // On récupére ensuite les id des topics qui correspondent aux différents pid
    $result = $db->query('SELECT id, topic_id FROM '.$db->prefix.'posts WHERE id='.implode(' OR id=', $pids)) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    if (!$db->num_rows($result))
        message($lang_common['Bad request']);

    while ($pid_id = $db->fetch_assoc($result))
    {
        $adresse[$pid_id['id']] = Array('topic_id' => $pid_id['topic_id']);

        if (isset($query))
            $query .= ' OR topic_id='.$pid_id['topic_id'];
        else
            $query = $pid_id['topic_id'];
    }

    // On récupére et on classe ensuite les pid de tous les posts de tous les topics concernés
    $result = $db->query('SELECT topic_id, id FROM '.$db->prefix.'posts WHERE topic_id='.$query.' ORDER BY posted') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    while ($id_pid = $db->fetch_assoc($result))
        $posts[$id_pid['topic_id']][] = $id_pid['id'];

    // On recherche les pid des liens dans les pid des topics et on récupére la place qu'ils occupent pour calculer leur page
    foreach ($posts AS $id => $pids)
    {
        foreach(array_keys($adresse) AS $pid) {
            if(($position = array_search($pid, $pids)) !== false)
                $adresse[$pid]['p'] = ceil(($position + 1) / $pun_user['disp_posts']);
        }
    }

    // On remplace enfin les adresses avec les pid par des adresses uniques et directes avec l'id du topic en précisant la page
    foreach($adresse AS $pid => $url)
        $tpl_main = str_replace(str_replace('<PID>', $pid, $pattern_in), htmlentities(str_replace(Array('<ID>', '<P>'), Array($url['topic_id'], $url['p']), $pattern_out)), $tpl_main);
}

// On en profite pour virer tous les ?p=1 ou &p=1 qui doublonnent aussi inutilement les pages
$tpl_main = preg_replace('#(\?|&)p\=1([^0-9]{1})#', '$2', $tpl_main);

/* Fin dupplication */

// Close the db connection (and free up any result data)
$db->close();

// Spit out the page
exit($tpl_main);

Je ne sais pas si l'erreur est du a la mise a jour que j'ai effectué du forum car je ne me suis jamais rendu dans le menu Signalements siffle

Merci de vos aides.

Hors ligne

#2 17-04-2007 19:02:24

Fly
Membre

Re : Allowed memory size of

Bon, ca fonctionne et j'ai rien modifié. J'ai juste signaler un post et j'ai pu accéder au menu signalement.

Hors ligne

Pied de page des forums