Seite 1 von 1

Registrieren nicht möglich

Verfasst: 08.05.2006 19:57
von Ruhrpottler
Hallo Leute,

nachdem sich nun schon über mehrere Wochen hinweg keine neuen User mehr bei mir angemeldet haben, wurde ich stutzig und wollte grade einen Testuser anmelden.
Mit dem Abschicken der Registrierung bekomm ich folgende Fehlermeldung:
Fatal error: Call to undefined function: dss_rand() in /home/m/marler-forumtreff.de/public_html/boardmarl/profile.php on line 68
Aber irgendwie hab ich grad überhaupt keinen Plan warum das plötzlich nicht mehr geht. Hab immer hier und da was eingebaut, wieder ausgebaut usw. Bisschen Chaos halt :oops: ... und jetzt weiß ich echt nicht mehr weiter. Vielleicht kann mir jemand nen Tipp geben???

Hier die Passage aus der profile.php
//
// Set default email variables
//
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/profile.'.$phpEx : 'profile.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';

$server_url = $server_protocol . $server_name . $server_port . $script_name;

// -----------------------
// Page specific functions
//
function gen_rand_string($hash)
{
$rand_str = dss_rand();

return ( $hash ) ? md5($rand_str) : substr($rand_str, 8);
}
//
// End page specific functions
// ---------------------------

//
// Start of program proper
//

Verfasst: 08.05.2006 20:59
von MartinITM
Hio,

du hast wohl bei dem Update vergessen die Funktion in der function.php einzubauen.

Code: Alles auswählen

/**
* Our own generator of random values
* This uses a constantly changing value as the base for generating the values
* The board wide setting is updated once per page if this code is called
* With thanks to Anthrax101 for the inspiration on this one
* Added in phpBB 2.0.20
*/
function dss_rand()
{
	global $db, $board_config, $dss_seeded;

	$val = $board_config['rand_seed'] . microtime();
	$val = md5($val);
	$board_config['rand_seed'] = md5($board_config['rand_seed'] . $val . 'a');
   
	if($dss_seeded !== true)
	{
		$sql = "UPDATE " . CONFIG_TABLE . " SET
			config_value = '" . $board_config['rand_seed'] . "'
			WHERE config_name = 'rand_seed'";
		
		if( !$db->sql_query($sql) )
		{
			message_die(GENERAL_ERROR, "Unable to reseed PRNG", "", __LINE__, __FILE__, $sql);
		}

		$dss_seeded = true;
	}

	return substr($val, 16);
}
Added in phpBB 2.0.20 naja, das sind nur 4 Wochen ;)