[PHP] kleines problem mit ner php datei

Dieses Thema im Forum "Webentwicklung" wurde erstellt von Halloweenracer, 16. Oktober 2006 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. Diese Seite verwendet Cookies. Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies. Weitere Informationen
  1. #1 16. Oktober 2006
    kleines problem mit ner php datei

    huhu,

    ich hab nen wbb.. hab mir was eingebaut, und ich bekomme jetzt nen fehler..

    PHP:
    Parse error :   syntax error unexpected  '?'  in  / usr / export / www / vhosts / H4ll0w33nr4c3r / hosting / uharc / wbb2 /global. php ( 213 ) : eval() 'd code on line 2
    was genau is denn der fehler? ich hab mich schon kaputtgesucht in der global.php..

    ich hab sie mal noch rangehangen..

    danke schonmal im vorraus :)

    PHP:
    <? php
    @ error_reporting ( 7 );
    $phpversion  phpversion ();


    require( './acp/lib/functions.php' );
    if (
    version_compare ( $phpversion '4.1.0' ) == - 1 ) {
        
    $_REQUEST  array_merge ( $HTTP_COOKIE_VARS $HTTP_POST_VARS $HTTP_GET_VARS );
        
    $_COOKIE  =&  $HTTP_COOKIE_VARS ;
        
    $_SERVER  =&  $HTTP_SERVER_VARS ;
        
    $_FILES  =&  $HTTP_POST_FILES ;
        
    $_GET  =&  $HTTP_GET_VARS ;
        
    $_POST  =&  $HTTP_POST_VARS ;
    }
    // remove slashes in get post cookie data...
    if ( get_magic_quotes_gpc ()) {
        if (
    count ( $_REQUEST ))  $_REQUEST  stripslashes_array ( $_REQUEST );
        if (
    count ( $_POST ))  $_POST  stripslashes_array ( $_POST );
        if (
    count ( $_GET ))  $_GET  stripslashes_array ( $_GET );
        if (
    count ( $_COOKIE ))  $_COOKIE  stripslashes_array ( $_COOKIE );
        if (
    count ( $_SERVER ))  $_SERVER  stripslashes_array ( $_SERVER );
    }

    @
    set_magic_quotes_runtime ( 0 );
    @
    ini_set ( 'magic_quotes_sybase' '0' );

    require( './acp/lib/config.inc.php' );
    require(
    './acp/lib/class_db_mysql.php' );

    $db  = &new  db ( $sqlhost $sqluser $sqlpassword $sqldb $phpversion );


    require( './acp/lib/options.inc.php' );


    require( './acp/lib/class_smtp.php' );


    if (isset( $_REQUEST [ 'postid' ]))  $postid  $_REQUEST [ 'postid' ];
    if (isset(
    $_REQUEST [ 'threadid' ]))  $threadid  $_REQUEST [ 'threadid' ];
    if (isset(
    $_REQUEST [ 'pollid' ]))  $pollid  $_REQUEST [ 'pollid' ];
    if (isset(
    $_REQUEST [ 'attachmentid' ]))  $attachmentid  $_REQUEST [ 'attachmentid' ];
    if (isset(
    $_REQUEST [ 'boardid' ]))  $boardid  $_REQUEST [ 'boardid' ];


    if (isset( $postid )) {
        
    $postid  intval ( $postid );
        
    $post  $db -> query_first ( "SELECT * FROM bb" . $n . "_posts WHERE postid = ' $postid '" );
        if (!
    $post [ 'postid' ]) unset( $postid );
        else 
    $threadid  $post [ 'threadid' ];
    }


    require( './acp/lib/session.php' );


    if (isset( $threadid )) {
        
    $threadid  intval ( $threadid );
        
        
    $select  '' ;
        
    $join  '' ;
        
        if (
    $filename  ==  "thread.php" ) {
            
    $select  .=  ", v.id AS isvoted" ;
            
    $join  .=  " LEFT JOIN bb" . $n . "_votes v ON (v.id=t.threadid AND v.votemode=2 AND " .(( $wbbuserdata [ 'userid' ]) ? ( "v.userid='" . $wbbuserdata [ 'userid' ]. "'" ) : ( "v.ipaddress='" . addslashes ( $REMOTE_ADDR ). "'" )). ")" ;
            
            if (
    $wbbuserdata [ 'userid' ]) {
                
    $select  .=  ", tv.lastvisit, s.emailnotify, s.countemails" ;    
                
    $join  .=  " LEFT JOIN bb" . $n . "_threadvisit tv ON (tv.threadid=t.threadid AND tv.userid='" . $wbbuserdata [ 'userid' ]. "')
                LEFT JOIN bb"
    . $n . "_subscribethreads s ON (s.userid='" . $wbbuserdata [ 'userid' ]. "' AND s.threadid=t.threadid)" ;
            }
        }
        
        
    $thread  $db -> query_first ( "SELECT t.*" . $select . " FROM bb" . $n . "_threads t" . $join . " WHERE t.threadid = ' $threadid '" );
        
        
    $select  '' ;
        
    $join  '' ;
        
        if (!
    $thread [ 'threadid' ]) unset( $threadid );
        else 
    $boardid  $thread [ 'boardid' ];
    }
    if (isset(
    $pollid )) {
        
    $pollid  intval ( $pollid );
        
    $poll  $db -> query_first ( "SELECT bb" . $n . "_threads.*, bb" . $n . "_polls.* FROM bb" . $n . "_polls LEFT JOIN bb" . $n . "_threads USING (threadid) WHERE bb" . $n . "_polls.pollid = ' $pollid '" );
        if (!
    $poll [ 'pollid' ]) unset( $pollid );
        else {
            if (
    $poll [ 'boardid' ]) {
                
    $boardid  $poll [ 'boardid' ];
                unset(
    $threadid );
                unset(
    $thread );
            }
        }
    }
    if (isset(
    $attachmentid )) {
        
    $attachmentid  intval ( $attachmentid );
        
    $attachment  $db -> query_first ( "SELECT at.*, " .
        
    "t.boardid, p.threadid, p.visible, p.userid, " .
        
    "pm.privatemessageid, pm.inoutbox, pm.senderid, pmr.recipientid, pmr.deletepm " .
        
    "FROM bb" . $n . "_attachments at " .
        
    "LEFT JOIN bb" . $n . "_posts p ON (p.postid=at.postid) " .
        
    "LEFT JOIN bb" . $n . "_threads t ON (t.threadid=p.threadid) " .
        
    "LEFT JOIN bb" . $n . "_privatemessage pm ON (pm.privatemessageid=at.privatemessageid) " .
        
    "LEFT JOIN bb" . $n . "_privatemessagereceipts pmr ON (pmr.privatemessageid=pm.privatemessageid AND pmr.recipientid=' $wbbuserdata [ userid ] ') " .
        
    "WHERE at.attachmentid = ' $attachmentid '" );

        if (!
    $attachment [ 'attachmentid' ]) {
            unset(
    $attachmentid );
            unset(
    $attachment );
        }
        if (
    $attachment [ 'postid' ] && ! $attachment [ 'privatemessageid' ]) {  // post attachment
            
    if ( $attachment [ 'boardid' ]) {
                
    $boardid  $attachment [ 'boardid' ];
                
    $threadid  $attachment [ 'threadid' ];
                unset(
    $thread );
            }
        }
        elseif (!
    $attachment [ 'postid' ] &&  $attachment [ 'privatemessageid' ]) {  // private message attachment
            
    unset( $boardid );
            unset(
    $threadid );
            unset(
    $thread );
        }
    }
    if (isset(
    $boardid )) {
        
    $boardid  intval ( $boardid );
        
    $board  getBoardAccessData ( $boardid );
        if (!
    $board [ 'boardid' ]) unset( $boardid );
    }


    $db -> unbuffered_query ( "UPDATE bb" . $n . "_sessions SET lastactivity = '" . $session [ 'lastactivity' ]. "', request_uri = '" . addslashes ( $REQUEST_URI ). "', boardid='"  . ((isset( $boardid )) ? ( $boardid ) : ( 0 )) .  "', threadid='" .((isset( $threadid )) ? ( $threadid ) : ( 0 )). "'"  . ((isset( $styleid )) ? ( ", styleid = ' $styleid '" ) : ( "" )).((isset( $langid )) ? ( ", langid=' $langid '" ) : ( "" )).((isset( $authentificationcode )) ? ( ", authentificationcode='" . addslashes ( $authentificationcode ). "'" ) : ( "" )). " WHERE sessionhash = ' $sid '" 1 );


    $style  = array();
    if (isset(
    $board ) && ( $board [ 'enforcestyle' ] ==  || ( $board [ 'styleid' ] !=  &&  $wbbuserdata [ 'styleid' ] ==  0 ))) {
        
    $style  $db -> query_first ( "SELECT s.styleid, s.templatepackid, s.designpackid, tp.templatestructure FROM bb" . $n . "_styles s LEFT JOIN bb" . $n . "_templatepacks tp ON(tp.templatepackid=s.templatepackid) WHERE s.styleid = '" . $board [ 'styleid' ]. "'" );
        
    $wbbuserdata [ 'designpackid' ] =  $style [ 'designpackid' ];
        
    $wbbuserdata [ 'templatepackid' ] =  $style [ 'templatepackid' ];
        
    $wbbuserdata [ 'styleid' ] =  $style [ 'styleid' ];
        
    $wbbuserdata [ 'templatestructure' ] =  $style [ 'templatestructure' ];
    }

    $result  $db -> unbuffered_query ( "SELECT * FROM bb" . $n . "_designelements WHERE designpackid = ' $wbbuserdata [ designpackid ] '" );
    while (
    $row  $db -> fetch_array ( $result ))  $style [ $row [ 'element' ]] =  $row [ 'value' ];


    require( './acp/lib/class_headers.php' );
    require(
    './acp/lib/class_tpl_file.php' );
    $tpl  = &new  tpl ( intval ( $wbbuserdata [ 'templatepackid' ]));


    require( './acp/lib/class_language.php' );
    $lang  = &new  language ( $wbbuserdata [ 'languagepackid' ]);
    $lang -> load ( 'GLOBAL,OWN' );  // global, own langcat

    define ( 'ENCODING' $lang -> get ( 'LANG_GLOBAL_ENCODING' ));
    $supportedCharsets  = array( 'UCS-4' 'UCS-4BE' 'UCS-4LE' 'UCS-2' 'UCS-2BE' 'UCS-2LE' 'UTF-32' 'UTF-32BE' 'UTF-32LE' 'UCS-2LE'
    'UTF-16' 'UTF-16BE' 'UTF-16LE' 'UTF-8' 'UTF-7' 'ASCII' 'EUC-JP' 'SJIS' 'EUCJP-WIN' 'SJIS-WIN' 'ISO-2022-JP' 'JIS' 'ISO-8859-1'
    'ISO-8859-2' 'ISO-8859-3' 'ISO-8859-4' 'ISO-8859-5' 'ISO-8859-6' 'ISO-8859-7' 'ISO-8859-8' 'ISO-8859-9' 'ISO-8859-10'
    'ISO-8859-13' 'ISO-8859-14' 'ISO-8859-15' 'BYTE2BE' 'BYTE2LE' 'BYTE4BE' 'BYTE4LE' 'BASE64' '7bit' '8bit' 'UTF7-IMAP' );

    if (
    in_array ( wbb_strtoupper ( ENCODING ),  $supportedCharsets ) &&  extension_loaded ( 'mbstring' ) &&  version_compare ( $phpversion '4.3.0' ) >=  0 ) {
        
    define ( 'USE_MBSTRING' true );
    }
    else {
        
    define ( 'USE_MBSTRING' false );    
    }


    $style [ 'imagefolder' ] =  $lang -> get ( "LANG_GLOBAL_IMAGEFOLDER_PREFIX" ). $style [ 'imagefolder' ];


    $o_master_board_name  $master_board_name ;
    $master_board_name  getlangvar ( $master_board_name $lang );


    $phpinclude  wbb_trim ( $tpl -> get ( "phpinclude" ));
    if (
    $phpinclude  !=  '' ) {
        
    $phpinclude  str_replace ( '\\"' '"' $phpinclude );
        
    $phpinclude  str_replace ( '\\\\' '\\' $phpinclude );
        
        eval(
    $phpinclude );    
    }


    $header_pms  '' ;
    $header_acp  '' ;
    eval(
    "\$css = \"" . $tpl -> get ( "css" ). "\";" );
    eval(
    "\$headinclude = \"" . $tpl -> get ( "headinclude" ). "\";" );
    $lang -> items [ 'LANG_GLOBAL_COPYRIGHT' ] =  $lang -> get ( "LANG_GLOBAL_COPYRIGHT" , array( '$boardversion'  =>  $boardversion ));
     
         
    $server  getenv ( "SERVER_SOFTWARE" );
        
    $phpversion  phpversion ();

        
    $result  $db -> query_first ( "SHOW VARIABLES LIKE 'VERSION'" );
        
    $mysqlver  $result [ 1 ];

        
    $table_data  0 ;
        
    $table_idx  0 ;
        
    $db_all_record  0 ;
        
    $db_all  0 ;
        
    $result  $db -> query ( "SHOW TABLE STATUS" );
        while (
    $row  $db -> fetch_array ( $result )) {
            
    $table_data  +=  $row [ 'Data_length' ];
            
    $table_idx   +=  $row [ 'Index_length' ];
            
    $db_all_record  += $row [ 'Rows' ];
        }
        
    $db_all  $table_data  $table_idx ;
        
    $mysqlmem  round ( $db_all / 1048576 , 2 );

        if (
    $db_all_record  >=  1000 $db_all_record  number_format ( $db_all_record 0 "" $lang -> get ( "LANG_GLOBAL_THOUSANDS_SEP" ));
        
    $lang -> items [ 'LANG_STATSINFO_SERVERDB_DESC' ] =  $lang -> get ( "LANG_STATSINFO_SERVERDB_DESC" , array( '$master_board_name'  =>  $master_board_name '$server'  =>  $server '$phpversion'  =>  $phpversion '$mysqlver'  =>  $mysqlver '$mysqlmem'  =>  $mysqlmem '$db_all_record'  =>  $db_all_record ));
        
    eval(
    "\$footer = \"" . $tpl -> get ( "footer" ). "\";" );
    if (
    $wbbuserdata [ 'userid' ])  $usercbar_username  htmlconverter ( $wbbuserdata [ 'username' ]);
    else 
    $usercbar_username  '' ;
    eval(
    "\$usercbar = \"" . $tpl -> get ( "usercbar" ). "\";" );
    eval(
    "\$header = \"" . $tpl -> get ( "header" ). "\";" );
    eval(
    "\$ticker = \"" . $tpl -> get ( "ticker" ). "\";" );
    if (
    $wbbuserdata [ 'can_view_board' ] ==  &&  $filename  !=  "login.php"  &&  $filename  !=  "logout.php"  &&  $filename  !=  "register.php"  &&  $filename  !=  "forgotpw.php" access_error ();

    verify_ip ( $REMOTE_ADDR );
    if (
    $offline  ==  &&  $wbbuserdata [ 'can_view_off_board' ] ==  &&  $filename  !=  "login.php"  &&  $filename  !=  "logout.php"  &&  $filename  !=  "forgotpw.php"  &&  $filename  !=  "register.php" ) {
        
    $offlinemessage  nl2br ( htmlconverter ( $offlinemessage ));
        eval(
    "\$tpl->output(\"" . $tpl -> get ( "offline" ). "\");" );
        exit();    
    }

    if (
    $wbbuserdata [ 'pmpopup' ] ==  2 ) {
        if (
    $filename  !=  "pms.php"  && (!isset( $_POST ) ||  count ( $_POST ) ==  0 ) &&  $filename  !=  "attachment.php"  &&  $filename  !=  "attachmentedit.php"  &&  $filename  !=  "logout.php"  &&  $filename  !=  "markread.php"  &&  $filename  !=  "misc.php"  &&  $filename  !=  "modcp.php"  &&  $filename  !=  "polledit.php"  &&  $filename  !=  "register.php"  &&  $filename  !=  "search.php"  && ( $filename  !=  "thread.php"  || !isset( $_REQUEST [ 'goto' ])) &&  $filename  !=  "threadrating.php"  &&  $filename  !=  "usercp.php" ) {
            eval(
    "\$headinclude .= \"" . $tpl -> get ( "pmpopup_open" ). "\";" );
        }
    }

    if (isset(
    $boardid )) {
        

        
    $board [ 'o_title' ] =  $board [ 'title' ];
        
    $board [ 'title' ] =  getlangvar ( $board [ 'title' ],  $lang );
        
        if (!
    checkpermissions ( "can_enter_board" ))  access_error ();
        if (
    $board [ 'password' ]) {
            
    $lang -> load ( 'BOARD' );
            if (isset(
    $_COOKIE [ $cookieprefix . 'boardpasswords' ]))  $boardpasswords  decode_cookie ( $_COOKIE [ $cookieprefix . 'boardpasswords' ]);
            else 
    $boardpasswords  = array();
            
            if (isset(
    $_POST [ 'boardpassword' ])) {
                if (
    $_POST [ 'boardpassword' ] ==  $board [ 'password' ]) {
                    
    $boardpasswords [ $boardid ] =  md5 ( $board [ 'password' ]);
                    if (
    $wbbuserdata [ 'usecookies' ] ==  1 encode_cookie ( 'boardpasswords' time () +  3600  24  365 false );
                    else 
    encode_cookie ( 'boardpasswords' 0 false );
                    
                    
    redirect ( $lang -> items [ 'LANG_BOARD_PASSWORD_REDIRECT' ],  "board.php?boardid= $boardid " . $SID_ARG_2ND );
                }
                else {
                    eval(
    "error(\"" . $lang -> get ( "LANG_BOARD_ERROR_FALSEPASSWORD" ). "\");" );
                }
            }
            elseif (!isset(
    $boardpasswords [ $boardid ]) ||  $boardpasswords [ $boardid ] !=  md5 ( $board [ 'password' ])) {
                eval(
    "\$tpl->output(\"" . $tpl -> get ( "board_password" ). "\");" );
                exit();    
            }
        }
    }

    if (isset(
    $threadid ) && isset( $thread [ 'visible' ]) &&  $thread [ 'visible' ] ==  && ! checkmodpermissions ()) {
        
    error ( $lang -> get ( "LANG_GLOBAL_ERROR_FALSELINK" , array( '$adminmail'  =>  $adminmail )));
    }
    if (isset(
    $postid ) && isset( $post [ 'visible' ]) &&  $post [ 'visible' ] ==  && ! checkmodpermissions ()) {
        
    error ( $lang -> get ( "LANG_GLOBAL_ERROR_FALSELINK" , array( '$adminmail'  =>  $adminmail )));
    }

    if (isset(
    $_POST [ 'change_editor' ]) &&  $_POST [ 'change_editor' ]) {
        
    $wbbuserdata [ 'usewysiwyg' ] =  $_POST [ 'change_editor' ];
    }
    else if (isset(
    $_POST [ 'usewysiwyg' ]) &&  $_POST [ 'usewysiwyg' ]) {
        
    $wbbuserdata [ 'usewysiwyg' ] =  $_POST [ 'usewysiwyg' ];
    }
    ?>
     

  2. Anzeige
  3. #2 16. Oktober 2006
    AW: kleines problem mit ner php datei

    Ein Fehler im Template .. schau dir nochmal das template nach PHP-Code an da muss irgendwo nen Fehler sein
     
  4. #3 16. Oktober 2006
    AW: kleines problem mit ner php datei

    huhu,

    danke schonmal dafür..

    aba welches Template genau das sein könnte, das weißt du nicht zufällig?

    mfg
     
  5. #4 16. Oktober 2006
    AW: kleines problem mit ner php datei

    Ne Sorry, das kann halt nur eins unter den Sein die da verwendet werden. Such am besten nach jedem eval und guck dir davon die Temapltes an die da verwendet werden.

    FlowFlo
     
  6. #5 16. Oktober 2006
    AW: kleines problem mit ner php datei

    wenn du nen hack eingebaut hast, dann schau mal ob du nicht was vergessen hast in die global.php einzufügen...
     
  7. #6 16. Oktober 2006
    AW: kleines problem mit ner php datei

    wenn du einen hack eingebaut hast, dann überspiele die veränderten dateien einfach mit dem backup, dass du vorher sicher angelegt hast!

    danach kannst du nochmal versuchen den hack einzubauen...
     
  8. #7 17. Oktober 2006
    AW: kleines problem mit ner php datei

    hoi,

    jo backup habe ich und mir gehts ja da drum, dass in der install von dem hack auch stand, wenn ich diesen error bekomme, dass ich da die "zusatzbeschriftungen" aus dem php code entfernen soll.. das habe ich gemacht^^

    mfg
     

  9. Videos zum Thema
Die Seite wird geladen...
Similar Threads - PHP kleines problem
  1. Antworten:
    1
    Aufrufe:
    602
  2. Antworten:
    3
    Aufrufe:
    462
  3. Antworten:
    3
    Aufrufe:
    357
  4. Antworten:
    4
    Aufrufe:
    1.012
  5. [PHP] Kleines CMS

    F1r3st0rm , 7. Februar 2008 , im Forum: Webentwicklung
    Antworten:
    10
    Aufrufe:
    864