Seite 1 von 1

was ist denn das für ein fehler?

Verfasst: 02.06.2006 17:44
von habbi
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
was bedeutet das?
was habe ich falsch gemacht?

Verfasst: 02.06.2006 23:11
von Spezial
Da werden Sie geholfen!

Code: Alles auswählen

http://www.php-fehlermeldungen.de/artikel,56,warning-unknown()-your-script-possibly-relies-on-a-session-side-effect-which-existed,.html
Die URL...da steht worans liegt...Aber der Link funzt im phpBB net hier Oo Copy & Paste!

Verfasst: 03.06.2006 07:57
von habbi
ich brings nicht hin..
hier der script:

Code: Alles auswählen

<?php
session_start();
require("connect.inc.php");
if ($_GET['hello'] == "script")
{
echo 'Hello Master!';
die;
}
include "config.inc.php";
if(!isset($_POST['submit'])) {
$inhalt .= '<form action="login.php" method="post">
<table width="100%" border="0" cellpadding="5" cellspacing="1" align="center">
<tr>
<td align="center" colspan="2">
<b>LogIn</b>
</td>
</tr>
<tr>
<td width="170">Benutzername</td>
<td width="230"><input type="text" name="username" size="20" class="input"></td>
</tr>
<tr>
<td width="170">Passwort</td>
<td width="230"><input type="password" name="password" size="20" class="input"></td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" name="submit" value="LogIn" class="button">
</td>
</tr>
</table>
</form>';
}elseif(!$_POST['username'] || $_POST['username'] == "") {
$inhalt .= '<p align="center">Bitte gib einen Benutzernamen an!<br><br><a href="login.php">Zur&uuml;ck</a></p>';
}elseif(!$_POST['password'] || $_POST['password'] == "") {
$inhalt .= '<form action="login.php" method="post">';
$inhalt .= '<p align="center">Ein Passwort brauchen wir schon ;-)<br><br>';
$inhalt .= '<input type="hidden" name="username" value="'.$_POST['username'].'">';
$inhalt .= '<input type="submit" name="zurueck" value="Zur&uuml;ck">';
$inhalt .= '</p>';
$inhalt .= '</form>';
}else{
$password = md5($_POST['password']);
$query = @mysql_query("SELECT user, passwort FROM dieb_user_".$digit." WHERE user = '".$_POST['username']."'") or die('Select ist fehlgeschlagen!');
   $result = @mysql_fetch_array($query) or die('<p align="center">Der gew&auml;hlte Benutzername existiert nicht!<br><a href="index.php">Zur&uuml;ck</a><BR><a href="neu.php">Anmelden</a></p>');
     if($password != $result['passwort']){
     $inhalt .= '<form action="login.php" method="post">';
     $inhalt .= '<p align="center">Das Passwort ist falsch, versuch es nochmal!<br><br>';
     $inhalt .= '<input type="hidden" name="username" value="'.$_POST['username'].'">';
     $inhalt .= '<input type="submit" name="zurueck" value="Zur&uuml;ck"></p>';
     $inhalt .= '</form>';
     }else{
     $user = $result['user'];
     session_register('user');
$inhalt .= 'Login erfolgreich! <a href="usermenue.php">Weiter</a>';
   }
}
$jahr = date(Y);
$jahranzahl = '2005-'.$jahr;
$template = implode("",file("template/style.html"));
$template = str_replace("<?inhalt?>", $inhalt, $template);
echo ($template);
/* Das Copyright darf nicht entfernt werden
** sollte ich mit bekommen das Sie es entfernt haben
** können Sie mit einer Anzeige oder eine Geldbuße von 300€ rechnen
*/
echo '<BR><BR><center><table border="0" cellspacing="1" cellpadding="3" width="350" border="0" bgcolor="#000000"><tr><td bgcolor="'.$tabelle1.'"><center>Dieb Spiel Script (Version 3.0)<BR>Copyright &copy; '.$jahranzahl.' <a href="http://www.eichhornleib.de" target="_blank">Eichhornleib.de</a> (Marvin Rabe)</center></td></tr></table></center>';
?>

Verfasst: 04.06.2006 10:02
von habbi
*push*
(ist nach einem tag erlaubt, oder?)

Verfasst: 05.06.2006 11:02
von habbi
naja..
*schonwiederpush*

Verfasst: 05.06.2006 13:44
von S2B
Finde:

Code: Alles auswählen

$user = $result['user'];
session_register('user'); 
Ersetze mit:

Code: Alles auswählen

$_SESSION['user'] = $user;