hallo leute, ich habe ein problem mit dem kennwortschutz für eine webseite. der kode ist:
<?php
include("zgng.inc");
?>
<?
//Authentifizierung
function authenticate()
{
Header("WWW-authenticate: basic realm=\"tcscanadaimmigration\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Not permission";
exit;
}
if (!isset($PHP_AUTH_USER))
authenticate();
else
{
if(($NAME_REQUIRED == $PHP_AUTH_USER) &&
($PW_REQUIRED == $PHP_AUTH_PW))
echo ("Hallo $PHP_AUTH_USER");
else
authenticate();
}
?>
wenn ich es auf localhost probiere, funktioniert alles, wenn ich es auf den server hochlade, bekomme ich diese meldung:
Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/veverick/members.tcscanadaimmigration.com/katarina.php:6) in /hsphere/local/home/veverick/members.tcscanadaimmigration.com/katarina.php on line 32
Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/veverick/members.tcscanadaimmigration.com/katarina.php:6) in /hsphere/local/home/veverick/members.tcscanadaimmigration.com/katarina.php on line 33
Not permission
Ich habe keine ahnung, was ich falsch mache, weiss jemand rat?
danke, eva
<?php
include("zgng.inc");
?>
<?
//Authentifizierung
function authenticate()
{
Header("WWW-authenticate: basic realm=\"tcscanadaimmigration\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Not permission";
exit;
}
if (!isset($PHP_AUTH_USER))
authenticate();
else
{
if(($NAME_REQUIRED == $PHP_AUTH_USER) &&
($PW_REQUIRED == $PHP_AUTH_PW))
echo ("Hallo $PHP_AUTH_USER");
else
authenticate();
}
?>
wenn ich es auf localhost probiere, funktioniert alles, wenn ich es auf den server hochlade, bekomme ich diese meldung:
Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/veverick/members.tcscanadaimmigration.com/katarina.php:6) in /hsphere/local/home/veverick/members.tcscanadaimmigration.com/katarina.php on line 32
Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/veverick/members.tcscanadaimmigration.com/katarina.php:6) in /hsphere/local/home/veverick/members.tcscanadaimmigration.com/katarina.php on line 33
Not permission
Ich habe keine ahnung, was ich falsch mache, weiss jemand rat?
danke, eva
Kommentar