Seite 1 von 1

Php-Problem

Verfasst: 19.08.2007, 15:46
von tomtom84
Hallo zusammen,
ich wollte heute auf meinen phpbb-forum den "singlemod" installieren. Jetzt hab ich 4 verschiedene Error-Medungen. Ich wäre echt dankbar, wenn jemand über die Code-ausschnitte drüberschauen würde. Bin nicht so versiert in Php. Vielen, vielen dank im Vorraus!!!

also, wenn ich mein eigenes Profil aufrufen möchte oder mich registrieren:

Parse error: syntax error, unexpected ';' in /is/htdocs/wp1066766_EGVMMEC266/www/Forum/phpBB2-2.0.22-deutsch/phpBB2/includes/usercp_register.php on line 136

130. {
131. if ( !empty($HTTP_POST_VARS[$param]) )
132. {
133. $$var = trim($HTTP_POST_VARS[$param]);
134. }
135. }
136.
137. $signature = (isset($signature)) ? str_replace(// Start add - Single MOD
138. $single = ( isset($HTTP_POST_VARS['single']) ) ? intval ($HTTP_POST_VARS['single']) : 0;
139. // End add - Single MOD
140. '<br />', "\n", $signature) : '';
141. $signature_bbcode_uid = '';
142.
143. // Run some validation on the optional fields. These are pass-by-ref, so they'll be changed to
144. // empty strings if they fail.


wenn ich mir Forenbeiträge anschauen will:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /is/htdocs/wp1066766_EGVMMEC266/www/Forum/phpBB2-2.0.22-deutsch/phpBB2/viewtopic.php on line 894


882. $poster_rank = '';
883. $rank_image = "; // Start add - Single MOD
884. $single_image = '';
885. // End add - Single MOD
886. if ( $postrow[$i]['user_id'] == ANONYMOUS )
887. {
888. }
889. else if ( $postrow[$i]['user_rank'] )
890. {
891. for($j = 0; $j < count($ranksrow); $j++)
892. {
893. if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
894. {
895. $poster_rank = $ranksrow[$j]['rank_title'];
896. $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '"
alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
897. }
898. }
899. }
900. else


wenn ich mir das Profil eines Users anschauen will:

Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')' in /is/htdocs/wp1066766_EGVMMEC266/www/Forum/phpBB2-2.0.22-deutsch/phpBB2/includes/usercp_viewprofile.php on line 229

228. 'LOCATION' => ( $profiledata['user_from'] ) ? $profiledata['user_from'] : '&nbsp;',
229. 'OCCUPATION' => ( $profiledata['user_occ'] ) ? $profiledata['user_occ'] : '&nbsp;',
230. 'INTERESTS' =>// Start add - Single MOD
231. 'SINGLE' => $single,
232. // End add - Single MOD ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : '&nbsp;',
233. 'AVATAR_IMG' => $avatar_img,


wenn ich den Administrationsbereich besuche:

Parse error: syntax error, unexpected T_VARIABLE in /is/htdocs/wp1066766_EGVMMEC266/www/Forum/phpBB2-2.0.22-deutsch/phpBB2/admin/admin_users.php on line 249


247. $website = ( !empty($HTTP_POST_VARS['website']) ) ? trim(strip_tags( $HTTP_POST_VARS['website'] ) ) : '';
248. $location = ( !empty($HTTP_POST_VARS['location']) ) ? trim(strip_tags( $HTTP_POST_VARS['location'] ) ) : '';
249. $occupation = ( !empty($HTTP_POST_VARS['occupation']) ) ? trim(strip_tags( $HTTP_POST_VARS['occupation'] ) ) : '';
250. $interests = ( !empty($HTTP_POST_VARS['interests']) ) // Start add - Single MOD
251. $single = ( isset($HTTP_POST_VARS['single']) ) ? intval ($HTTP_POST_VARS['single']) : 0;
252. // End add - Single MOD ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';
253. $signature = ( !empty($HTTP_POST_VARS['signature']) ) ? trim(str_replace('<br />', "\n", $HTTP_POST_VARS['signature'] ) ) : '';

Verfasst:
von
SEO Consulting bei ABAKUS Internet Marketing
Erfahrung seit 2002
  • persönliche Betreuung
  • individuelle Beratung
  • kompetente Umsetzung

Jetzt anfragen: 0511 / 300325-0.


Verfasst: 19.08.2007, 15:59
von Michael1967

Code: Alles auswählen

133. $$var = trim&#40;$HTTP_POST_VARS&#91;$param&#93;&#41;; 
?????

Verfasst: 19.08.2007, 17:16
von tomtom84
Zeile 133 gehört noch zum phpbb-Code. Da sollte der Fehler eigentlich nicht liegen!? Was ist an der Zeil nicht korrekt?
Danke für die schnelle Reaktion
Thomas

Verfasst: 19.08.2007, 20:53
von Michael1967
Wäre es so nicht richtig?

Code: Alles auswählen

$var = trim&#40;$HTTP_POST_VARS&#91;$param&#93;&#41;; 

Verfasst: 20.08.2007, 00:17
von tomtom84
keine Ahnung... wäre es so richtig? Wer weis das?
Danke für die Hilfe
Thomas

Verfasst: 20.08.2007, 02:57
von To-Bi-As
das "$$var" stimmt schon, das ist eine dynamische Variablen-Zuweisung. Dein Fehler liegt wo anders, ist aber aus dem Code nicht wirklich ersichtlich. Erster war ein Fehler mit dem ";" der kann aber auch schon weiter vorne sein, der Debug von PHP ist da nicht immer genau. Der andere war anscheinend ein fehlendes oder zu vieles " ' " im Code und der nächste eine doppelt geschlossene Klammer. Der letzte dann eine ungültige Variable.

Also da scheinen die Probleme wo anders zu liegen und PHP "verschleppt" die in dem Fall nur.

Ist nicht einfach da was zu finden, aber in Zeile 250 beim letzten habe ich was, da scheint was zu fehlen.

Code: Alles auswählen

$interests = &#40; !empty&#40;$HTTP_POST_VARS&#91;'interests'&#93;&#41; &#41; // Start add - Single MOD
ergibt keinen Sinn. Erstens fehlt das " ; " am Ende und auch die Bedingung ansich, also sowas wie bei den anderen oben drüber ala " ? xxx : xxx "

Ebenso bei dem vorher:

Code: Alles auswählen

230. 'INTERESTS' =>// Start add - Single MOD 
da fehlt auch was. Das ist eine Zuweisung für ein Array, aber der Value fehlt. Anstelle dessen steht da nur ein PHP-Kommentar.

Beim ersten in Zeile 140 ist auch einiges im Argen, also da passt insgesamt sehr vieles nicht. Falsch kopiert?

Gruß, Ingo

Verfasst: 20.08.2007, 03:00
von nachfrag
moin,

kenn mich mit dem mod zwar nicht aus, aber

Code: Alles auswählen

$$var 
ist ein dynamisch vergebener Variablen-Name und keine falsche Syntax ...

zu deinen Errors:

Z. 136 (bzw. 137):

Code: Alles auswählen

str_replace&#40;
... dann geht es mit Kommentar weiter - der Befehl scheint in Z. 140 fortgesetzt zu werden.
Z. 894 sehe ich den Fehler gerade nicht
Z. 230 fehlt auch etwas:

Code: Alles auswählen

'INTERESTS' =>// Start add - Single MOD
hört einfach auf ...

Grüße

edit: Ingo war schneller ;)