DEBUG MODE bei Registration, bitte helft mir

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
Oede
Mitglied
Beiträge: 256
Registriert: 27.10.2002 17:47
Wohnort: Germany
Kontaktdaten:

DEBUG MODE bei Registration, bitte helft mir

Beitrag von Oede »

Hallöchen,
ich habe da ein Problem, wenn sich jemand auf mein Board registrieren will, bekommt er eine Fehlermeldung und zwar die hier:

Code: Alles auswählen

Could not insert data into users table

DEBUG MODE

SQL Error : 1136 Column count doesn't match value count at row 1

INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, 
user_occ, user_from, user_plz, user_from_flag, user_interests, user_sig, user_css, user_sig_bbcode_uid, user_avatar, 
user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, 
user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, 
user_lang, user_style, user_gender, user_level, user_allow_pm, user_custom_color, user_allow_mass_pm, user_birthday, 
user_next_birthday_greeting, user_active, user_actkey) VALUES 
(75, 'M****', 1053806398, '0d46ab3a230b1d60501c80746fa1ecc9', 
'i****@********.net, '147209388', 'http://www.*****_*****.net', '', 'Linz, Oberösterreich', '', 'austria.gif', 
'D2 LoD, Webdesignen', 'mobile | webdesign | :dance2: [img:402231efec]
http://www.************.de/board/images/smiles/wazzup_sg.gif[/img:402231efec] :dance2: | 
http://www.************.de info@mobile-webdesign.de', 
'402231efec', '', '', 0, 1, '', '', '************@********, 1, 1, 1, 1, 1, 1, 1, 1, 1, 'D M d, Y g:i a', 
'english', 3, 0, 1, '', '1', 0, 1, '2', '999999', '', 0, '4c55eece')

Line : 563
File : /home/www/******/html/board/includes/usercp_register.php
Hier der Ausschnitt der betreffenden Zeile, die ich auch überhaupt nicht verstehe!

Code: Alles auswählen

## MOD Title: Custom username color defined in profile
## MOD Version: 2.0.2
## MOD Author: Acecool < webmaster@acecoolco.com > ( Josh M. M. ) http://www.acecoolco.com 
## MOD Description: Lets users choose a username color in profile if they have enough posts. 

Code: Alles auswählen

includes/function_validate.php

#
#-----[ FIND ]------------------------------------------
#

//
// Does supplementary validation of optional profile fields. This expects common stuff like trim() and strip_tags()
// to have already been run. Params are passed by-ref, so we can set them to the empty string if they fail.
//
function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$location, &$occupation, &$interests, &$sig)
{
	$check_var_length = array('aim', 'msnm', 'yim', 'location', 'occupation', 'interests', 'sig');

	for($i = 0; $i < count($check_var_length); $i++)
	{
		if ( strlen($$check_var_length[$i]) < 2 )
		{
			$$check_var_length[$i] = '';
		}
	}

	// ICQ number has to be only numbers.
	if ( !preg_match('/^[0-9]+$/', $icq) )
	{
		$icq = '';
	}
	
	// website has to start with http://, followed by something with length at least 3 that
	// contains at least one dot.
	if ( $website != "" )
	{
		if ( !preg_match('#^http:\/\/#i', $website) )
		{
			$website = 'http://' . $website;
		}

		if ( !preg_match('#^http\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website) )
		{
			$website = '';
		}
	}

	return;
}

#
#-----[ IN-LINE FIND]------------------------------------------ 
#

&$interests

#
#-----[ IN-LINE AFTER, ADD]------------------------------------------ 
#

, &$custom_color

#
#-----[ IN-LINE FIND]
#

		if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website))
		{
			$website = '';
		}
	}

#
#-----[ AFTER, ADD]
#

	// Custom_color should not contain characters that are not usable in HTML color code
	if ( !preg_match('/^[0-9A-Fa-f]{6}$/', $custom_color) )
	{
		$custom_color = '';
	}

Gruß
Oede
Wie gut, das es Frauen und Männer gibt!
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

..kannst Du ma einen Link zu einer txt Version der usercp_register.php posten !?

Was verstehst´n bei der Anleitung ned ? :roll:
Benutzeravatar
Oede
Mitglied
Beiträge: 256
Registriert: 27.10.2002 17:47
Wohnort: Germany
Kontaktdaten:

Beitrag von Oede »

Ja klar, hier:
usercp_register.php


Ach, *lol*, die Anleitung verstehe ich doch, hatte wohl nur einen Black_Out! :wink:

Gruß
Oede[/url]
Wie gut, das es Frauen und Männer gibt!
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_plz, user_from_flag, user_interests, user_sig, user_css, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_gender, user_level, user_allow_pm, user_custom_color, user_allow_mass_pm, user_birthday, user_next_birthday_greeting, user_active, user_actkey)
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $plz) . "', '$user_flag', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', '$user_css', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, '" . str_replace("\'", "''", $custom_color) . "', '$gender', 0, 1, '$allow_mass_pm', '$birthday', '$next_birthday_greeting', ";
..ersetze diesen Block ma mit..
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
Das is der Standardcode ohne Hacks. Nun baue die Hacks (user_css, user_color, gender, birthday, mass_pm, user_flag) wieder in diesen INSERT INTO Block ein und achte dabei genau auf die Anweisungen (ob ersetzen oder einfügen, ob davor oder danach).. du hattest einiges an falschen Stellen eingefügt.
Benutzeravatar
Oede
Mitglied
Beiträge: 256
Registriert: 27.10.2002 17:47
Wohnort: Germany
Kontaktdaten:

Beitrag von Oede »

Ups, achso!
ja klar mache ich, vielen Dank für Deine Hilfe!
Gruß
Oede
Wie gut, das es Frauen und Männer gibt!
Antworten

Zurück zu „phpBB 2.0: Mod Support“