login  Naam:   Wachtwoord: 
Registreer je!
 Forum

Cannot modify header information (Opgelost)

Offline janwillem117 - 12/12/2008 16:50 (laatste wijziging 12/12/2008 16:51)
Avatar van janwillem117Nieuw lid Ik heb een login-systeem gedownload en geinstalleerd maar als ik dan ga inloggen krijg ik de volgende melding:
Warning: Cannot modify header information - headers already sent by (output started at /storage/mijndomein/users/107932/public/sites/www.janwillem-117.nl/login/config.php:1) in /storage/mijndomein/users/107932/public/sites/www.janwillem-117.nl/login/redirect.php on line 44

Warning: Cannot modify header information - headers already sent by (output started at /storage/mijndomein/users/107932/public/sites/www.janwillem-117.nl/login/config.php:1) in /storage/mijndomein/users/107932/public/sites/www.janwillem-117.nl/login/redirect.php on line 45

Warning: Cannot modify header information - headers already sent by (output started at /storage/mijndomein/users/107932/public/sites/www.janwillem-117.nl/login/config.php:1) in /storage/mijndomein/users/107932/public/sites/www.janwillem-117.nl/login/redirect.php on line 104

Kan iemand helpen?

Hier de redirect.php :
  1. <?
  2.  
  3. //prevents caching
  4. header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
  5. header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
  6. header("Cache-Control: post-check=0, pre-check=0",false);
  7.  
  8.  
  9. //clear session variables
  10.  
  11.  
  12. //require the functions file
  13. require ("config.php");
  14. require ("functions.php");
  15.  
  16. //check to see if cookies are already set, remember me
  17. if ((!$lr_user) || (!$lr_pass))
  18. {
  19.  
  20. $username = $_POST[username];
  21. $password = $_POST[password];
  22.  
  23. }else{
  24.  
  25. $username = $lr_user;
  26. $password = $lr_pass;
  27.  
  28. }
  29.  
  30. //if username or password is blank, send to errorlogin.html
  31. if ((!$username) || (!$password))
  32. {
  33.  
  34. header("Location:$base_dir/errorlogin.html");
  35. }
  36.  
  37. //sets cookies to remember this computer if the user asks to
  38. if ($_POST[remember] == "Yes")
  39. {
  40. setcookie("lr_user", $username, $duration, "/", $domain);
  41. setcookie("lr_pass", $password, $duration, "/", $domain);
  42. }
  43.  
  44. if ($_POST[activate] == "Yes")
  45. {
  46. //make the connection to the database
  47. $connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
  48. $db = @mysql_select_db($db_name,$connection)or die(mysql_error());
  49.  
  50. //build and issue the query
  51. $sql ="UPDATE $table_name SET verified = '1' WHERE username = '$_POST[username]'";
  52. $result = @mysql_query($sql,$connection) or die(mysql_error());
  53. }
  54.  
  55. //sets session variables
  56. sess_vars($base_dir, $server, $dbusername, $dbpassword, $db_name, $table_name, $username, $password);
  57.  
  58. //check to see if the user has to change their password
  59. if ($_SESSION[pchange] == "1")
  60. {
  61. $_SESSION[redirect] = "$base_dir/pass_change.html";
  62. }
  63.  
  64. //check to see if the user has activated the account
  65. if ($_SESSION[verified] == "0")
  66. {
  67. $_SESSION[redirect] = "$base_dir/not_activated.html";
  68. }
  69.  
  70. //make the connection to the database
  71. $connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
  72. $db = @mysql_select_db($db_name,$connection)or die(mysql_error());
  73.  
  74. //build and issue the query
  75. $sql ="SELECT * FROM banned";
  76. $result = @mysql_query($sql,$connection) or die(mysql_error());
  77.  
  78. while ($sql = mysql_fetch_object($result))
  79. {
  80. $banned = $sql -> no_access;
  81. if ($username == $banned || $REMOTE_ADDR == $banned)
  82. {
  83. include ('banned.html');
  84. }
  85. }
  86.  
  87. $last_log = last_login();
  88.  
  89. //updates table with last log as now
  90. $sql = "UPDATE $table_name SET last_login = '$last_log' WHERE username = '$_SESSION[user_name]'";
  91. $result = @mysql_query($sql,$connection) or die(mysql_error());
  92.  
  93. if (($_SESSION[redirect] != "$base_dir/errorlogin.html") && ($log_login == "1"))
  94. {
  95. include('loglogin.php');
  96. }
  97.  
  98. //redirects the user
  99. header("Location:$_SESSION[redirect]");
  100.  
  101. ?>
  102.  
  103. <head><title>Redirect</title></head>

2 antwoorden

Gesponsorde links
Offline Wim - 12/12/2008 16:54
Avatar van Wim Crew algemeen google, dit vindt je ONMIDDELIJK
Offline Koen - 12/12/2008 17:21
Avatar van Koen PHP expert ob_start();

Helemaal vanboven aan je document.. -.-'

(Dus het hoofdbestand waarin je redirect.php include..)
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.189s