Cita:
Iniciado por sciutomaxi
Amigo tengo un par de dudas primero porque pones phpbb3 yo lo tengo en la carpeta forum .
Y no se que pasa se loguea pero a los dos segundos me redirige a otra pagina mal pero sigue logueado
este es sesiones.php
Código PHP:
<?php
define('IN_PHPBB', true); // se define que se va a usar phpbb.
$phpbb_root_path = $_SERVER['DOCUMENT_ROOT'] .'/forum/'; // el path directo del servidor a phpbb3, varia algo dependiendo del servidor, si hay errores con esto en el mismo error sale el path correcto.
$phpbb_url_path = 'http://sherton.servidoruno.com.ar:8081/forum/'; // la url hacia tu phpbb3
$phpEx = substr(strrchr(__FILE__, '.'), 1); // tipo de extension
include($phpbb_root_path . 'common.' . $phpEx); // incluimos el common.php que es muy importante para la bd
include($phpbb_root_path . 'config.' . $phpEx); //include de config.php importante tambien en bd usuarios y pass
// iniciamos sesion
$user->session_begin();
$auth->acl($user->data);
?>
este es login.php
<?php
include_once("sesiones.php");
if($user->data['is_registered'])
{
//en phpbb3_ suponemos que el prefijo de la tabla es phpbb3_
$avvy = "SELECT * FROM phpbb_users WHERE user_id =" . $user->data['user_id'];
$result = mysql_query($avvy) or die (mysql_error());
while($row = mysql_fetch_array($result))
{
$link = $row['user_avatar'];
$width = $row['user_avatar_width'];
$height = $row['user_avatar_height'];
}?>
<a href="<?php echo $phpbb_url_path?>memberlist.php?mode=viewprofile&u=<?php echo $user->data['user_id'];?> " target="_self"></a>
<table width="145" height="392" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td align="center" valign="top">
<table width="145" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">Hola <a href="<?php echo $phpbb_url_path?>memberlist.php?mode=viewprofile&u=<?php echo $user->data['user_id'];?> " target="_self"> <?php echo $user->data['username'];?> </a>!</td>
</tr>
</table>
<table width="135" height="255" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="250" align="center" valign="middle"><img src="<?php echo $phpbb_url_path?>download/file.php?avatar=<? echo $link?> " border="0" width="<? echo $width?> " height=" <? echo $height?>" alt='Avatar' /></td>
</tr>
</table>
<table width="145" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle" class="Estilo5"><span class="Estilo20"><a href="<?php echo $phpbb_url_path?>ucp.php" >Visita tu<br />
Panel de control</a><br />
<?php echo( "<a href=" . $phpbb_url_path . 'ucp.php?mode=logout&redirect=../index.php' . '&sid=' . $user->data['session_id'] . " >Cerrar Sesion</a>");?>.</td>
</tr>
</table>
<table width="145" height="72" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="center" valign="top">0</td>
</tr>
</table></td>
</tr>
</table>
que esta pasando por favor ayudenme gracias
cambia phpbb3 por tu carpeta
analiza bien el codigo
he actualizado login.php
reemplazalo y vuleve a intentarlo
cambie index2.php a index.php