To jest tylko wersja do druku, aby zobaczyć pełną wersję tematu, kliknij TUTAJ
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

Ogólne - Błąd sesji podczas rejestracji nowego użytkownika

Pabolo - 24-07-2022, 08:33
Temat postu: Błąd sesji podczas rejestracji nowego użytkownika
Witajcie. Moje forum to: http://forum.mm2c.c0.pl/

Problem dotyczy tego, gdy próbuje zarejestrować nowego użytkownika to wyskakuje taki oto komunikat:

Kod:
Sesja połączenia wygasła lub numer ID sesji jest nieprawidłowy.
Spróbuj ponownie.


Co może być przyczyną, że taki komunikat wyskakuje.

[ Dodano: 24-07-2022, 18:49 ]
OK. Problem rozwiązany. Trzeba było zmienić kod w pliku includes\usercp_register.php, a dokładniej dać przed kodem $signature = str_replace('<br />', "\n", $signature);] :

Kod:
include($phpbb_root_path . 'includes/functions_add.'.$phpEx);

if ( $mode == 'register' )
{
    check_disable_function('REGISTERING');
}

if ( isset($HTTP_POST_VARS['submit']) || isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar']) || $mode == 'register' )
{
    include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
    include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
    include($phpbb_root_path . 'includes/functions_post.'.$phpEx);

    if ( $mode == 'editprofile' )
    {
        $SID2 = get_vars('sid', '', 'POST');
        $user_id = get_vars('user_id', 0, 'POST', true);
        $current_email = trim(xhtmlspecialchars( get_vars('current_email', '', 'POST') ));
        $veryfy_user_value = get_vars('verify_user', '', 'POST');
    }

    $strip_var_list = array('email' => 'email', 'icq' => 'icq', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests', 'custom_color' => 'custom_color', 'custom_rank' => 'custom_rank', 'b_day' => 'b_day', 'b_md' => 'b_md', 'b_year' => 'b_year');

    // Strip all tags from data ... may p**s some people off, bah, strip_tags is
    // doing the job but can still break HTML output ... have no choice, have
    // to use xhtmlspecialchars ... be prepared to be moaned at.

    while( list($var, $param) = @each($strip_var_list) )
    {
        if ( !empty($HTTP_POST_VARS[$param]) )
        {
            $$var = (!is_array($HTTP_POST_VARS[$param]))? trim(xhtmlspecialchars($HTTP_POST_VARS[$param])) : '';
        }
    }

    $username = phpbb_clean_username(get_vars('username', '', 'POST'));

    $trim_var_list = array('cur_password' => 'cur_password', 'new_password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');

    while( list($var, $param) = @each($trim_var_list) )
    {
        if ( !empty($HTTP_POST_VARS[$param]) )
        {
            $$var = (!is_array($HTTP_POST_VARS[$param])) ? trim($HTTP_POST_VARS[$param]) : '';
        }
    }

    if ( $custom_fields_exists )
    {
        for($i = 0; $i < count($fields_array); $i++)
        {
            $$fields_array[$i] = ($HTTP_POST_VARS[$fields_array[$i]] == 'no_image.gif') ? '' : ( (!is_array($HTTP_POST_VARS[$fields_array[$i]])) ? trim(xhtmlspecialchars($HTTP_POST_VARS[$fields_array[$i]])) : '' );
        }
    }


Oraz dodać zapytanie SQL:

1.
Kod:
ALTER TABLE `phpbb_users` ADD PRIMARY KEY ( `user_id` );


2.
Kod:
ALTER TABLE `phpbb_users` CHANGE `user_id` `user_id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT;



Powered by phpBB modified by Przemo © 2003 phpBB Group