Problem was that the TMP dir was full and we couldn'T write down the session
file... Seems this jams the server completly. Be aware that if anything like
that happen to you that you have to check fro the TMP files that might be
overflooding your partition.

"Mathieu Dumoulin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> We are using php 4.0.6 here on a dev server and we are getting a weird
> session_start() problem.
>
> After setting up the login on another page, if we register any of our
three
> required varaibles to go on, the session_start() will simply crash and
loop
> endlessly. We have tested everything:
>
> - setting values after registering, before registering, not registering at
> all and as soon as we register a variable it loops endlessly when we start
> the session. Needless to say that we NEED to fix that or else we have a
> wonderfull system with no login nor sessions...
>
> here is the code:
>
> [[[[[[[[[[[[[[[LOGIN.PHP]]]]]]]]]]]]]]]]]]]
>
> <?
> session_start();
> include('../includes/open.php');
>
> function verifypass($login, $password)
> {
>  global $sql, $result;
>  $req="SELECT  *  FROM giuser WHERE login= '" .  $login  . "' AND password
> ='" .  md5($password) ."'    ";
>  $result=mysql_query($req, $sql);
>
>  if(mysql_num_rows($result) < 1) // le resultat est unique
>  {
>   return 'Erreur: mot de passe invalide';
>  }
>  return '';
> }
>
> if($submit == '' || $login == '' || $password == '' || ($moo =
> verifypass($login, $password))!='')
> {
>
>  echo '<html><head><title>Gestion des projets</title><meta
> http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
>     <link href="../css/giprojects.css" rel="stylesheet"
> type="text/css"></head>
>     <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
> class="giprojects">';
>  echo '<FORM name="loginform" method="post" action="login.php?submit=1">
>     <table width="100%" height="100%" border="0" cellpadding="5"
> cellspacing="0" class="txt11px">
>     <tr> <td><p align="center"><img
> src="../images/logo.gif"><br><br><br><br>Nom d\'usager :
>     <INPUT name="login" type="text" id="projet25" size="18" maxlength="15"
> >';
>  if($submit!='' && $login=='') echo '&nbsp; *';
>  echo '<br>Mot de passe : <INPUT name="password" type="password"
id="login"
> size="20" maxlength="15">';
>  if($submit!='' && $password=='') echo '&nbsp; *';
>  echo '<br><br><a href="#" onClick="document.loginform.submit(); return
> true;">Entrer</a></p></td>
>     </tr></table><div align="center"></div></body></html>';
> }
> else
> {
>  $req="SELECT  *  FROM giuser WHERE login= '" .  $login  . "' AND password
> ='" .  md5($password) ."'";
>  $result=mysql_query($req, $sql);
>
>  if(mysql_num_rows($result) < 1) // le resultat est unique
>  {
>   include( 'login.php?e=1');
>  }
>  else
>  {
>   $row = mysql_fetch_array($result);
>
>   session_register("session_user");
>   session_register("session_niveauusager");
>   session_register("session_nomusager");
>   $session_user = $login;
>   $session_nomusager = $row[nom];
>   $session_niveauusager=$row[level];
>
>   echo '<HTML><HEAD><TITLE>GI Projects</TITLE><META http-equiv="refresh"
> content="5; URL=todo.php?user=' . $login .'"></HEAD><BODY>';
>   $req="SELECT  nom FROM  person WHERE id = ".  $row[personid] ;
>   $result = mysql_query($req, $sql);
>   $row = mysql_fetch_array($result);
>   echo '<center><h3>Bienvenu '.  $row[nom] . '!</h3></center>';
>   echo '<center>[niveau d\'access: '. $session_niveauusager . ']'; }
> }
>
> include('../includes/close.php');
> ?>
>
> [[[[[[[[[[[[[[[[[[[[[[TODO.PHP]]]]]]]]]]]]]]]]]]]] (File that we get
> redirected to after loging in that loops edlessly)
>
> <?php
> session_start();    //<--------------- JAMS HERE
> exit("AHHHHHHHH");
> //include('secur.php'); ?>
> <?php include('../includes/open.php'); ?>
>
> <HTML>
> <HEAD>
> <?php //include('../includes/helpers.php');
> </HEAD>
> </HTML>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to