My b2evolution Version: Not Entered
I've just made a fresh install of the latest version of b2evo, and when I try to acces admin.php (?ctrl=whatever) , it makes me a infinite loop, and never loads the page (Firefox prevent the page for bla bla bla).
I've search in here and couple of people seemed to have the same problem, but no solution was founded (not at least where i read). Doing a little bit of research on my own, i've found (i think so) that the problem is here.
// Redirect old-style URLs (e.g. /admin/plugins.php), if they come here because the webserver maps "/admin/" to "/admin.php"
// NOTE: this is just meant as a transformation from pre-1.8 to 1.8!
if( ! empty( $_SERVER['PATH_INFO'] ) && $_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF'] ) // the "!= PHP_SELF" check seems needed by IIS..
{
// Try to find the appropriate controller (ctrl) setting
foreach( $ctrl_mappings as $k => $v )
{
if( preg_match( '~'.preg_quote( $_SERVER['PATH_INFO'], '~' ).'$~', $v ) )
{
$ctrl = $k;
break;
}
}
// Sanitize QUERY_STRING
if( ! empty( $_SERVER['QUERY_STRING'] ) )
{
$query_string = explode( '&', $_SERVER['QUERY_STRING'] );
foreach( $query_string as $k => $v )
{
$query_string[$k] = strip_tags($v);
}
$query_string = '&'.implode( '&', $query_string );
}
else
{
$query_string = '';
}
header_redirect( url_add_param( $admin_url, 'ctrl='.$ctrl.$query_string, '&' ), true );
exit;
}
Any idea of why the page goes on and on adding "&ctrl=whatever" and never stops?
Thanks for reading!
See if the code posted in [url=http://forums.b2evolution.net/viewtopic.php?t=14916]this thread[/url] helps
¥