protected function configureSidLength()
	{
		$bits_per_character = (int) (ini_get('session.sid_bits_per_character') !== false
			? ini_get('session.sid_bits_per_character')
			: 4);
		$sid_length         = (int) (ini_get('session.sid_length') !== false
			? ini_get('session.sid_length')
			: 40);
		if (($sid_length * $bits_per_character) < 160)
		{
			$bits = ($sid_length * $bits_per_character);
			// Add as many more characters as necessary to reach at least 160 bits
			$sid_length += (int) ceil((160 % $bits) / $bits_per_character);
			ini_set('session.sid_length', $sid_length);
		}

		// Yes, 4,5,6 are the only known possible values as of 2016-10-27
		switch ($bits_per_character)
		{
			case 4:
				$this->sidRegexp = '[0-9a-f]';
				break;
			case 5:
				$this->sidRegexp = '[0-9a-v]';
				break;
			case 6:
				$this->sidRegexp = '[0-9a-zA-Z,-]';
				break;
		}

		$this->sidRegexp .= '{' . $sid_length . '}';
	}
protected function configureSidLength()
	{
		$bits_per_character = (int) (ini_get('session.sid_bits_per_character') !== false
			? ini_get('session.sid_bits_per_character')
			: 4);
		$sid_length         = (int) (ini_get('session.sid_length') !== false
			? ini_get('session.sid_length')
			: 40);
		if (($sid_length * $bits_per_character) < 160)
		{
			$bits = ($sid_length * $bits_per_character);
			// Add as many more characters as necessary to reach at least 160 bits
			$sid_length += (int) ceil((160 % $bits) / $bits_per_character);
			ini_set('session.sid_length', $sid_length);
		}

		// Yes, 4,5,6 are the only known possible values as of 2016-10-27
		switch ($bits_per_character)
		{
			case 4:
				$this->sidRegexp = '[0-9a-f]';
				break;
			case 5:
				$this->sidRegexp = '[0-9a-v]';
				break;
			case 6:
				$this->sidRegexp = '[0-9a-zA-Z,-]';
				break;
		}

		$this->sidRegexp .= '{' . $sid_length . '}';
	}
protected function configureSidLength ( ) { $ bits_per_character = ( int ) ( ini_get ( 'session.sid_bits_per_character' ) !== false ? ini_get ( 'session.sid_bits_per_character' ) : 4 ) ; $ sid_length = ( int ) ( ini_get ( 'session.sid_length' ) !== false ? ini_get ( 'session.sid_length' ) : 40 ) ; if ( ( $ sid_length * $ bits_per_character ) < 160 ) { $ bits = ( $ sid_length * $ bits_per_character ) ; // Add as many more characters as necessary to reach at least 160 bits $ sid_length += ( int ) ceil ( ( 160 % $ bits ) / $ bits_per_character ) ; ini_set ( 'session.sid_length' , $ sid_length ) ; } // Yes, 4,5,6 are the only known possible values as of 2016-10-27 switch ( $ bits_per_character ) { case 4 : $ this -> sidRegexp = '[0-9a-f]' ; break ; case 5 : $ this -> sidRegexp = '[0-9a-v]' ; break ; case 6 : $ this -> sidRegexp = '[0-9a-zA-Z,-]' ; break ; } $ this -> sidRegexp .= '{' . $ sid_length . '}' ; }
Configure session ID length

To make life easier, we used to force SHA-1 and 4 bits per
character on everyone. And of course, someone was unhappy.

Then PHP 7.1 broke backwards-compatibility because ext/session
is such a mess that nobody wants to touch it with a pole stick,
and the one guy who does, nobody has the energy to argue with.

So we were forced to make changes, and OF COURSE something was
going to break and now we have this pile of shit. -- Narf

@return void
Configure session ID length