that was my initial guess too , but login/index.php doesnt use "redirect".
pages are redirected by means of
header("Location: $CFG->wwwroot");
other pages that use "redirect" , like logout.php, do not return errors.
Another theory ( and i hope it is not true) is that something goes wrong in the log-in process, which has nothing to do with the redirection, and the server redirects me to a default page instead of returning the error message.
I have solved the problem with the session-test script, with the help of a frind of mine which knows unix servers better than me. Thats the new version, its not elegant but lycos likes it:
<?PHP
/// This is a tiny standalone diagnostic script to test that sessions
/// are working correctly on a given server.
///
/// Just run it from a browser. The first time you run it will
/// set a new variable, and after that it will try to find it again.
/// The random number is just to prevent browser caching.
session_start();
if (!isset($_SESSION["test"])) { // First time you call it.
echo "<P>No session found - starting a session now.";
$_SESSION["test"] = "welcome back!";
} else { // Subsequent times you call it
echo "<P>Session found - ".$_SESSION["test"];
echo "<P>Sessions are working correctly</P>";
}
//echo "<P><A HREF="session_test.php?random=".rand(1,10000).">Reload this page</A></P>"
echo "<P><A HREF=\"session_test.php?random="; echo(rand(1,10000)); echo "\">Reload this page</A></P>"
?>