Conexión de cuentas de Junta de foro a la portada de mi sitio Web

  • StonerLifestyle
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Mar 14, 2012
  • Mensajes: 11
  • Status: Offline

Nota Marzo 16th, 2012, 4:19 pm

Of course:)
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Marzo 16th, 2012, 4:19 pm

  • natas
  • PHP Ninja
  • Proficient
  • No Avatar
  • Registrado: Mar 28, 2009
  • Mensajes: 305
  • Loc: AFK
  • Status: Offline

Nota Marzo 16th, 2012, 4:34 pm

OK...acabo de enterar que podría ser un problema con espacios en blanco...

empezar por eliminar los códigos de error reporting y ob_start. De este modo empiezas donde inicialmente encontró el problema.

Parece que este es un problema de espacio en blanco después hice algunas excavaciones.

diríjase a la página de índice (index.php) y buscar espacios en blanco que podría han entrado en su editor de texto. Im adivinar que la ": 8" al final del error podría significar línea 8. para empezar, buscando allí.
Custom Web Design
  • StonerLifestyle
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Mar 14, 2012
  • Mensajes: 11
  • Status: Offline

Nota Marzo 16th, 2012, 6:19 pm

Interesante idea sobre el espacio en blanco causando el mensaje de error que se mostrarán...

Quita el código de error reporting y ob_start y volvió el código original que me dio el error. Miré alrededor para cualquier cosa que llamó mi ojo y cualquier inusual espacios en blanco el software utilizado podría agregaron por accidente. Veo nada inusual.

Línea 8 en la página de índice es solo algunos javascript utilizado para puentes de imagen para el menú. Dado que este código ha sido aquí desde mucho antes de lo que supongo que la línea 8 es realmente no la cuestión causando el mensaje de error. Voy a publicar algún código de mi página de índice y ver si alguien ve algo que me falta podría causar este error de encabezado.

Código: [ Select ]
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
<title>Stoner Lifestyle</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0 //THIS IS LINE 8, I don't think this is causing any errors regarding headers right?
 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
 if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
  1. <head>
  2. <link rel="stylesheet" type="text/css" href="mystyle.css" />
  3. <title>Stoner Lifestyle</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <script type="text/JavaScript">
  6. <!--
  7. function MM_swapImgRestore() { //v3.0 //THIS IS LINE 8, I don't think this is causing any errors regarding headers right?
  8.  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  9. }
  10. function MM_preloadImages() { //v3.0
  11.  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  12.   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  13.   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  14. }
  15. function MM_findObj(n, d) { //v4.01
  16.  var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  17.   d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  18.  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  19.  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  20.  if(!x && d.getElementById) x=d.getElementById(n); return x;
  21. }
  22. function MM_swapImage() { //v3.0
  23.  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  24.   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  25. }
  26. //-->
  27. </script>
  28. </head>


Utilizar este código para abrir una sesión con la base de datos del Foro en la página de índice
Código: [ Select ]
<?php
 define('IN_PHPBB', true);
 $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : 'forum/';
 $phpEx = substr(strrchr(__FILE__, '.'), 1);
 include($phpbb_root_path . 'common.' . $phpEx);
 include($phpbb_root_path . 'includes/functions_display.' . $phpEx); //for importing lastest threads info from the forum
 $user->session_begin(); 
 $auth->acl($user->data);
 $user->setup();
 ?>
  1. <?php
  2.  define('IN_PHPBB', true);
  3.  $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : 'forum/';
  4.  $phpEx = substr(strrchr(__FILE__, '.'), 1);
  5.  include($phpbb_root_path . 'common.' . $phpEx);
  6.  include($phpbb_root_path . 'includes/functions_display.' . $phpEx); //for importing lastest threads info from the forum
  7.  $user->session_begin(); 
  8.  $auth->acl($user->data);
  9.  $user->setup();
  10.  ?>


Este es el último de los php en mi página de índice, se utiliza para comprobar si el usuario se registra en los foros y da un cuadro de inicio de sesión si no muestra enlace/nombre de usuario al panel de control si está conectado.

Código: [ Select ]
<?php
if ($user->data['user_id'] == ANONYMOUS) {
?>
  <form action="./forum/ucp.php?mode=login" method="post">
  <label for="username">Username:</label>
  &nbsp;
  <input type="text" name="username" id="username" size="20" title="Username" />
  <label for="password"><br>
  Password:</label>
  &nbsp;
  <input type="password" name="password" id="password" size="20" title="Password" />
  <input type="hidden" name="redirect" value="./index.php" />
  <br>
  <input type="submit" name="login" value="LOGIN" />&nbsp;&nbsp;<a href="./forum/ucp.php?mode=register">Register Now</a>&nbsp;
    <a href='./forum/ucp.php?mode=sendpassword'>Forget Password?</a>
  </form>        
     

<?php }
else
{
 echo "What's up ";
 echo $user->data['username'];
 echo "? You're logged into SLS.";
 echo " Click <a href='./forum/ucp.php'>here</a> to go to your control panel.";
}
?>
<!--- The following is for displaying the lastest threads ---->
<? 
  /*** phpBB3 - Last Active Topics System ***/
  //Show last x topics
  define('TOPICS_LIMIT',4);

  // Create arrays
  $topics = array();
  
  // Get forums that current user has read rights to.
  $forums = array_unique(array_keys($auth->acl_getf('f_read', true)));
  
  // Get active topics.
  $sql="SELECT *
  FROM " . TOPICS_TABLE . "
  WHERE topic_approved = '1' AND " . $db->sql_in_set('forum_id', $forums) . "
  ORDER BY topic_last_post_time DESC";
  $result = $db->sql_query_limit($sql,TOPICS_LIMIT);
  while ($r = $db->sql_fetchrow($result))
  {
    $topics[] = $r;
  }
  $db->sql_freeresult($result);
?>
<div>
<?
    
  foreach($topics as $t)
  {
    // Get folder img, topic status/type related information
    $topic_tracking_info = get_complete_topic_tracking($t['forum_id'], $t['topic_id']);
    $unread_topic = (isset($topic_tracking_info[$t['topic_id']]) && $t['topic_last_post_time'] > $topic_tracking_info[$t['topic_id']]) ? true : false;
    $folder_img = $folder_alt = $topic_type = '';
    topic_status($t, $t['topic_replies'], $unread_topic, $folder_img, $folder_alt, $topic_type);
    
    // output the link
    ?>
      <img style="vertical-align: text-bottom" src="<?=$user->img($folder_img, $folder_alt, false, '', 'src');?>" title="<?=$user->lang[$folder_alt];?>" alt="<?=$user->lang[$folder_alt];?>" />
      <a href="<?=$phpbb_root_path . 'viewtopic.php?f=' . $t['forum_id'] . '&amp;t=' . $t['topic_id'] . '&amp;p=' . $t['topic_last_post_id'] . '#p' . $t['topic_last_post_id'];?>"><?=html_entity_decode($t['topic_title']);?></a><br />
  <?
  }
  ?>
</div>
  1. <?php
  2. if ($user->data['user_id'] == ANONYMOUS) {
  3. ?>
  4.   <form action="./forum/ucp.php?mode=login" method="post">
  5.   <label for="username">Username:</label>
  6.   &nbsp;
  7.   <input type="text" name="username" id="username" size="20" title="Username" />
  8.   <label for="password"><br>
  9.   Password:</label>
  10.   &nbsp;
  11.   <input type="password" name="password" id="password" size="20" title="Password" />
  12.   <input type="hidden" name="redirect" value="./index.php" />
  13.   <br>
  14.   <input type="submit" name="login" value="LOGIN" />&nbsp;&nbsp;<a href="./forum/ucp.php?mode=register">Register Now</a>&nbsp;
  15.     <a href='./forum/ucp.php?mode=sendpassword'>Forget Password?</a>
  16.   </form>        
  17.      
  18. <?php }
  19. else
  20. {
  21.  echo "What's up ";
  22.  echo $user->data['username'];
  23.  echo "? You're logged into SLS.";
  24.  echo " Click <a href='./forum/ucp.php'>here</a> to go to your control panel.";
  25. }
  26. ?>
  27. <!--- The following is for displaying the lastest threads ---->
  28. <? 
  29.   /*** phpBB3 - Last Active Topics System ***/
  30.   //Show last x topics
  31.   define('TOPICS_LIMIT',4);
  32.   // Create arrays
  33.   $topics = array();
  34.   
  35.   // Get forums that current user has read rights to.
  36.   $forums = array_unique(array_keys($auth->acl_getf('f_read', true)));
  37.   
  38.   // Get active topics.
  39.   $sql="SELECT *
  40.   FROM " . TOPICS_TABLE . "
  41.   WHERE topic_approved = '1' AND " . $db->sql_in_set('forum_id', $forums) . "
  42.   ORDER BY topic_last_post_time DESC";
  43.   $result = $db->sql_query_limit($sql,TOPICS_LIMIT);
  44.   while ($r = $db->sql_fetchrow($result))
  45.   {
  46.     $topics[] = $r;
  47.   }
  48.   $db->sql_freeresult($result);
  49. ?>
  50. <div>
  51. <?
  52.     
  53.   foreach($topics as $t)
  54.   {
  55.     // Get folder img, topic status/type related information
  56.     $topic_tracking_info = get_complete_topic_tracking($t['forum_id'], $t['topic_id']);
  57.     $unread_topic = (isset($topic_tracking_info[$t['topic_id']]) && $t['topic_last_post_time'] > $topic_tracking_info[$t['topic_id']]) ? true : false;
  58.     $folder_img = $folder_alt = $topic_type = '';
  59.     topic_status($t, $t['topic_replies'], $unread_topic, $folder_img, $folder_alt, $topic_type);
  60.     
  61.     // output the link
  62.     ?>
  63.       <img style="vertical-align: text-bottom" src="<?=$user->img($folder_img, $folder_alt, false, '', 'src');?>" title="<?=$user->lang[$folder_alt];?>" alt="<?=$user->lang[$folder_alt];?>" />
  64.       <a href="<?=$phpbb_root_path . 'viewtopic.php?f=' . $t['forum_id'] . '&amp;t=' . $t['topic_id'] . '&amp;p=' . $t['topic_last_post_id'] . '#p' . $t['topic_last_post_id'];?>"><?=html_entity_decode($t['topic_title']);?></a><br />
  65.   <?
  66.   }
  67.   ?>
  68. </div>


Perdon por el post super largo, sólo quería todo lo que podría ser relevante en la búsqueda de la causa de este error de encabezado molestos publicar.

Gracias de nuevo:D
  • StonerLifestyle
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Mar 14, 2012
  • Mensajes: 11
  • Status: Offline

Nota Marzo 17th, 2012, 6:08 pm

Se trata de muchas cosas sin éxito. No parecen obtener el error de depuración de encabezado a desaparecer: ()
  • snares
  • Born
  • Born
  • No Avatar
  • Registrado: Oct 12, 2012
  • Mensajes: 1
  • Status: Offline

Nota Octubre 12th, 2012, 12:54 pm

StonerLifestyle escribió:
Se trata de muchas cosas sin éxito. No sale el error de depuración de cabecera a desaparecer: ()


Lo siento golpear este hilo, pero estoy teniendo los mismos problemas exactos como el OP y no importa lo que trato de la cabecera de errores no desaparecerá. Mis mensajes de error también aparecen en la parte superior de las páginas web aparentemente al azar, siempre mientras no ha iniciado sesión mi cuenta de phpbb. Si navegar a otra página y luego hacia atrás, los errores desaparecerá durante un tiempo antes reaparece con una carga de página más tarde.

Cualquier idea sería muy apreciada!

Gracias.

Publicar Información

  • Total de mensajes en este tema: 20 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 263 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC