Página 1 de 1

Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 17:53
por Torquest
Se trata de un problema al loguearme desde fuera

Posteo aqui por que no tengo permisos para postear en este articulo de tom|ta en tomatoma.ws y en el que segui los pasos que me indicaban


Siguiento las reglas de este foro les doy la informacion necesaria


DATOS DEL FORO

URL:XXXXXX
Plantilla(s) usuada(s): Ninguna
MODs instalados: Ninguno
Version de phpBB: 21 ( la ultima)
Servidor: Servidor de pago
Si es una actualizacion desde otra version: Ninguna actualizacion
Si es una conversion desde otro tipo de Foro: Ninguna conversion


DATOS DE LA URL EXTERIOR








PROBLEMA:


En la url exterior (http://www.foros-web.com/prueba.php Tengo problemas para loguearme desde fuera


mas exactamente este es el error


[quote] Warning: Cannot modify header information - headers already sent by (output started at /home/.humperdink/fiti/foros-web.com/prueba.php:9) in /home/.humperdink/fiti/foros-web.com/soporte/includes/sessions.php on line 366

Warning: Cannot modify header information - headers already sent by (output started at /home/.humperdink/fiti/foros-web.com/prueba.php:9) in /home/.humperdink/fiti/foros-web.com/soporte/includes/sessions.php on line 367
[/quoteicy]


Creo que el problema esta en las cookis pero no consigo ver la solucion

Os pongo el codigo entero, quizas ahi algun error quese me paso



[quote]


<?php
define('IN_PHPBB',true);
$site_root_path = 'xXXXX; // Absoloute SITE PATH Path
$phpbb_root_path = '/'xxx; // Forum Path
$root = 'http://foros-web.com'; // Root Dir of Site
$privvar = 'http://foros-web.com/soporte/privmsg.php';
$phpbb_root_path = $site_root_path . $phpbb_root_path;
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.php');
include_once ($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include_once ($phpbb_root_path . 'includes/functions.'.$phpEx);
// lets make a little check if your root_path is correct ;-)
//
if (!file_exists($phpbb_root_path . 'extension.inc'))
{
echo $phpbb_root_path;
die ('<tt><strong>phpBB Fetch All:</strong>
$phpbb_root_path is wrong and does not point to your forum.</tt>');
}
//
// now we include (integrate) some files which we need
//
//
//
//
//
// Start session management
//
if (!$userdata)
{
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
}

$avatar = '';
if ( $userdata['user_avatar_type'] && $userdata['username'] != ANONYMOUS && $userdata['user_allowavatar'] )
{
switch( $userdata['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="phpBB/' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="phpBB/' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}

if ( $userdata['user_new_privmsg'] )//private messages
{
$l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
$l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);

if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql);
}

$s_privmsg_new = 1;
$icon_pm = $images['pm_new_msg'];
}
else
{
$s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg'];
}
}
else
{
$l_privmsgs_text = $lang['No_new_pm'];

$s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg'];
}

if ( $userdata['user_unread_privmsg'] )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
}
else
{
$l_privmsgs_text_unread = $lang['No_unread_pm'];
}

if ($userdata['session_logged_in']) {
echo "<h2> Hola ".$userdata['username'] ." </h2>\n";
echo $avatar;?>
<ul>
<a href="http://foros-web.com/srte/profile.php?mode=editprofile" title="modifica tu perfil">Modifica tu perfil</a>
<a href="http://foros-web.com/orte/privmsg.php?folder=inbox" title="mensajes"><?php echo $l_privmsgs_text ?></a>
<a href="http://foros-web.com/orte/login.php?logout=true&sid=<? print $userdata['session_id']; ?>&redirect=../prueba.php&outside=1" class="out" title="salir">SALIR</a>



<?php
} else {
?>
<form action="http://foros-web.com/rte/login.php" size="1" method="post" height="13"><td colspan="8" bgcolor="#EAE9E9">
<p align="left"><font face="Verdana" size="1" height="5">login:<input type="Text" style="width:100px;height:17px;background-color:white;color:black;font-size:10pt; font-family:Verdana;text-align:center;">
password:
<input type="password" style="width:100px;height:17px;background-color:white;color:black;font-size:10pt; font-family:Verdana;text-align:center;"><input type="hidden" name="redirect" value="../prueba.php">
<input type="submit" name="login" value="enviar" style="width:70px;height:17px;border-width:none; font-size:8pt;border-style:none;border-color:grey;
color:#000000;">
<a href="<?php echo $phpbb_root_path ?>profile.php?mode=register" title="Léete las condiciones y decide si quieres pertenecer a esta comunidad.">Soy nuev@</a> <a href="<?php echo $phpbb_root_path ?>profile.php?mode=sendpassword" title="¿Un despiste? Danos tu nombre de usuario y tu correo electr&oacute;nico y te mandamos una nueva"></a></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td></form><?php }?>



[/quoteicy]



Espero haberlo hecho bien invi



Gracias de ante mano y saludos

Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 18:03
por invi
Si ahora está mejor.
A ver segun veo yo, la ruta del foro es soporte, lo cual yo no aseguro nada pero quizá lo pones mal.
Deberia ser algo asi.
$phpbb_root_path = '/soporte/'; // Forum Path

Y aqui deberia ser la rulta absoluta del sitio, no se si será /home/tuweb/etc./..
$site_root_path = 'Soporte'; // Absoloute SITE PATH Path

No se igual me equivoco, pero puedes probar..

Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 18:13
por Torquest
poniendole esto tal y como me indicas


$site_root_path = '/home/.humperdink/fiti/foros-web.com/prueba.php'; // Absoloute SITE PATH Path
$phpbb_root_path = '/soporte/'; // Forum Path



Me da directamente este error y no me muestra ni el formulario




[quote]
Warning: main(/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/extension.inc) [function.main]: failed to open stream: Not a directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 16

Warning: main(/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/extension.inc) [function.main]: failed to open stream: Not a directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 16

Warning: main() [function.include]: Failed opening '/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/extension.inc' for inclusion (include_path='.:/usr/local/lib/php') in /home/.humperdink/fiti/foros-web.com/prueba.php on line 16

Warning: main(/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/common.php) [function.main]: failed to open stream: Not a directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 17

Warning: main(/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/common.php) [function.main]: failed to open stream: Not a directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 17

Warning: main() [function.include]: Failed opening '/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/.humperdink/fiti/foros-web.com/prueba.php on line 17

Warning: main(/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/includes/bbcode.) [function.main]: failed to open stream: Not a directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 18

Warning: main() [function.include]: Failed opening '/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/includes/bbcode.' for inclusion (include_path='.:/usr/local/lib/php') in /home/.humperdink/fiti/foros-web.com/prueba.php on line 18

Warning: main(/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/includes/functions.) [function.main]: failed to open stream: Not a directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 19

Warning: main() [function.include]: Failed opening '/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/includes/functions.' for inclusion (include_path='.:/usr/local/lib/php') in /home/.humperdink/fiti/foros-web.com/prueba.php on line 19
/home/.humperdink/fiti/foros-web.com/prueba.php/soporte/phpBB Fetch All: $phpbb_root_path is wrong and does not point to your forum.[/quoteicy]

Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 18:14
por invi
Vuelve a dejarlo todo como estaba, pero simplemente cambia el forum path a ver que pasa.

Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 18:27
por Torquest
Cambiando solo el Forum Path respecto a los datosoriginales,como tu me dices quedarian los datos asi



$site_root_path = 'soporte'; // Absoloute SITE PATH Path
$phpbb_root_path = '/soporte/'; // Forum Path
$root = 'http://foros-web.com'; // Root Dir of Site
$privvar = 'http://foros-web.com/soporte/privmsg.php';





El error es este

[quote]
Warning: main(soporte/soporte/extension.inc) [function.main]: failed to open stream: No such file or directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 16

Warning: main(soporte/soporte/extension.inc) [function.main]: failed to open stream: No such file or directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 16

Warning: main() [function.include]: Failed opening 'soporte/soporte/extension.inc' for inclusion (include_path='.:/usr/local/lib/php') in /home/.humperdink/fiti/foros-web.com/prueba.php on line 16

Warning: main(soporte/soporte/common.php) [function.main]: failed to open stream: No such file or directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 17

Warning: main(soporte/soporte/common.php) [function.main]: failed to open stream: No such file or directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 17

Warning: main() [function.include]: Failed opening 'soporte/soporte/common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/.humperdink/fiti/foros-web.com/prueba.php on line 17

Warning: main(soporte/soporte/includes/bbcode.) [function.main]: failed to open stream: No such file or directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 18

Warning: main() [function.include]: Failed opening 'soporte/soporte/includes/bbcode.' for inclusion (include_path='.:/usr/local/lib/php') in /home/.humperdink/fiti/foros-web.com/prueba.php on line 18

Warning: main(soporte/soporte/includes/functions.) [function.main]: failed to open stream: No such file or directory in /home/.humperdink/fiti/foros-web.com/prueba.php on line 19

Warning: main() [function.include]: Failed opening 'soporte/soporte/includes/functions.' for inclusion (include_path='.:/usr/local/lib/php') in /home/.humperdink/fiti/foros-web.com/prueba.php on line 19
soporte/soporte/phpBB Fetch All: $phpbb_root_path is wrong and does not point to your forum.[/quoteicy]

Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 19:00
por mitch
Debería ser asi segun yo...

Código: Seleccionar todo

$site_root_path = '/home/.humperdink/fiti/foros-web.com/'; // Absoloute SITE PATH Path
$phpbb_root_path = 'soporte/';  // Forum Path

Re: Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 19:25
por Torquest
Debería ser asi segun yo...

Código: Seleccionar todo

$site_root_path = '/home/.humperdink/fiti/foros-web.com/'; // Absoloute SITE PATH Path
$phpbb_root_path = 'soporte/';  // Forum Path




Al parecer es esos datos creo que van bien.


Pero me sigue dando el mismo error cuando intento acceder en el archivo sessions del foro


Pueden ustedes probarlo con estos datos de prueba en www.foros-web.com/prueba.php


Nick: prueba
password: prueba



Da el error que puse en el primer post al hacer el logueo


[quote]Warning: Cannot modify header information - headers already sent by (output started at /home/.humperdink/fiti/foros-web.com/prueba.php:9) in /home/.humperdink/fiti/foros-web.com/soporte/includes/sessions.php on line 366

Warning: Cannot modify header information - headers already sent by (output started at /home/.humperdink/fiti/foros-web.com/prueba.php:9) in /home/.humperdink/fiti/foros-web.com/soporte/includes/sessions.php on line 367[/quoteicy]

Re: Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 19:29
por Torquest
Debería ser asi segun yo...

Código: Seleccionar todo

$site_root_path = '/home/.humperdink/fiti/foros-web.com/'; // Absoloute SITE PATH Path
$phpbb_root_path = 'soporte/';  // Forum Path



Rectifico, no pueden ser esos datos por que si ves a donde se dirige el link "soy nuev@" no es el correcto.


y se supone que el codigo entero esta hecho para que cuadre todo....


Mira todo el codigo entero que publique antes, kizas ahi algoque me e colado pero es que no lo veo

Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 21:23
por mitch
Lee este tema completo, desde este post: http://www.phpbb-es.com/foro/respuesta- ... html#42242

Es lo mismo, el mismo login, y ahi explico cada cosa que hize, y he dejado ese enlace .TXT para que veas cual es el código real de ese login_fuera.php y te hagas de una idea de cómo hacerlo tu.

Nos vemos.

Re: Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 22:20
por Torquest
Lee este tema completo, desde este post: http://www.phpbb-es.com/foro/respuesta- ... html#42242

Es lo mismo, el mismo login, y ahi explico cada cosa que hize, y he dejado ese enlace .TXT para que veas cual es el código real de ese login_fuera.php y te hagas de una idea de cómo hacerlo tu.

Nos vemos.

mich siguiendo ese post lo he hecho correctamente y me logueo y me desloqgueo bien, pero me sale un ERROR arriba, como puedo solucionarlo?

www.foros-web.com/prueba.php

Pruebalo

nick: prueba
pass: prueba


osea todo lo hace bien pero aparece un par de warning que no se como quietarlos


[quote]Warning: Cannot modify header information - headers already sent by (output started at /home/.humperdink/fiti/foros-web.com/prueba.php:9) in /home/.humperdink/fiti/foros-web.com/soporte/includes/sessions.php on line 254

Warning: Cannot modify header information - headers already sent by (output started at /home/.humperdink/fiti/foros-web.com/prueba.php:9) in /home/.humperdink/fiti/foros-web.com/soporte/includes/sessions.php on line 255[/quoteicy]

Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 22:38
por mitch
Y porque a mi no me aparece? http://www.thekuka.info/mitch/login_fuera.php

Si dices tenerlo igual, no deberían ambos funcionar? ni idea :roll: esto ya me supera amigo, yo no he hecho nada extraordinario, el código es exactamente el que sale alli, ahora que en tu foro aparezca ese error, no tengo ni idea.

Edito: veo que tu página tiene como título "Documento sin titulo" ... esto lo has puesto tu a mano? o estas editando todo esto mediante editores web? intenta hacer todo a mano, sin editor web, tal vez el editor web esté colocando espacios o algo que no debe. Yo lo he hecho todo a mano, sin editores externos.

Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 23:00
por Torquest
ok perfect, con el block de notas sin ningun error

Gracias, por que ya nos estabamos volviendo locos los dos, es curioso, pensaba que los editores Web (utilizaba Dreamweaver por si alguien le ocurre lo mismo en el futuro) estaban preparado para esto, pero curiosamente no.


Gracias por tu ayuda mich

De paso te indico que ahi un error en tu codigo que indicas aqui http://www.thekuka.info/mitch/login_fuera.txt

( mas que un error falta una cosilla)

Al final del todo falta cerrar el codigo php con ?>


Thanks

Respuesta: Loguin Fuera De PhpBB

Publicado: 25 Nov 2006, 23:02
por mitch
Ok gracias, corrigo eso.

Y por el mismo motivo de Dreamweaver debió ser el error del código que pusiste en un principio. Que extraño eh? creo desperté de buenas hoy porque sino no me explico como se me ocurrió indicarte eso :lol:

Nos vemos, tema solucionado! :P