Seite 1 von 1

Fehlermeldung beim Login nach 2.0.7er (manuell) Update

Verfasst: 19.03.2004 20:44
von Lodda
Hallo,

ich hab das manuelle Update auf das phpBB 2.0.7 gemacht, Anleitung hier: http://www.phpbbhacks.com/tutorials/206to207.html , nachdem ich mich nun versucht habe einzulogen auf dem Board bekam ich die Fehlermeldung
Parse error: parse error, unexpected T_ELSE in C:*********\forum2\login.php on line 88
Ich nehme an das dies mit den Änderungen in der login.php zusammenhängt, habe aber alles nach Anleitung eingfügt:

Code: Alles auswählen

login.php 
FIND 

Code:	
               if( $session_id ) 
               { 
                  $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx"; 
                  redirect(append_sid($url, true)); 
               }	


REPLACE WITH 

Code:	
               if( $session_id ) 
               { 
                  $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "index.$phpEx"; 
                  redirect(append_sid($url, true));	


FIND 

Code:	
            else 
            { 
               $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : ''; 
               $redirect = str_replace('?', '&', $redirect); 

               $template->assign_vars(array(	


REPLACE WITH 

Code:	
            else 
            { 
               $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : ''; 
               $redirect = str_replace('?', '&', $redirect); 

               $template->assign_vars(array(	


FIND 

Code:	
      else 
      { 
         $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : ""; 
         $redirect = str_replace("?", "&", $redirect); 

         $template->assign_vars(array(	


REPLACE WITH 

Code:	
      else 
      { 
         $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : ""; 
         $redirect = str_replace("?", "&", $redirect); 

         $template->assign_vars(array(	


FIND 

Code:	
      if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect'])) 
      { 
         $url = (!empty($HTTP_POST_VARS['redirect'])) ? $HTTP_POST_VARS['redirect'] : $HTTP_GET_VARS['redirect']; 
         redirect(append_sid($url, true)); 
      } 
      else 
      { 
         redirect(append_sid("index.$phpEx", true)); 
      } 
   } 
   else 
   { 
      $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx"; 
      redirect(append_sid($url, true)); 
   }	


REPLACE WITH 

Code:	
      if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect'])) 
      { 
         $url = (!empty($HTTP_POST_VARS['redirect'])) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : htmlspecialchars($HTTP_GET_VARS['redirect']); 
         redirect(append_sid($url, true)); 
      } 
      else 
      { 
         redirect(append_sid("index.$phpEx", true)); 
      } 
   } 
   else 
   { 
      $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "index.$phpEx"; 
      redirect(append_sid($url, true));
Was kann ich nun machen um mich wieder einlogen zu können? Rückgängig würde ich es nur ungerne machen. Danke!

Verfasst: 19.03.2004 21:59
von Acid
Thread gekürzt


Jetzt fällt´s mir auf..

Code: Alles auswählen

FIND

Code:   
               if( $session_id )
               {
                  $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx";
                  redirect(append_sid($url, true));
               }   


REPLACE WITH

Code:   
               if( $session_id )
               {
                  $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "index.$phpEx";
                  redirect(append_sid($url, true));

..da fällt noch eine abschliessende Klammer (}) unterhalb der letzten Zeile (vor else, was dann in der login.php in der nächsten Zeile zu finden ist.)
Der Fehler lag also nicht bei dir. :wink:

Super!

Verfasst: 19.03.2004 22:14
von Lodda
Hallo Acid,

das wars, toll, danke! :wink: