Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> PHP_AUTH_USER - nie dziala na PHP4.2.1
wassago
post
Post #1





Grupa: Przyjaciele php.pl
Postów: 701
Pomógł: 0
Dołączył: 26.06.2002
Skąd: Londyn

Ostrzeżenie: (0%)
-----


Do niedawna uzywalem php 4.1.1 i nie bylo problemu z logowaniem sie na strone uzywajac PHP_AUTH_USER (wszystko bylo ladnie - okienko gdzie wpisuje haslo i login). no i zainstalowalem PHP4.2.1 (nie radzcie mi abym wrocil do poprzedniej wersji bo GD2 tam nie dziala:) - zreszta w tej tez nie:/)...

Kod
/* PHP_AUTH_USER */



<?php

require("config.php");



$LOGIN = $login;

$PASSWORD = $pass;



function error ($error_message) {

   echo "<body bgcolor=#3A5980><div align=center><b><font size=1px color=#94bedc face=tahoma>".$error_message."</font></b></div><br>";

   exit;

}

if ( (!isset($_SERVER['PHP_AUTH_USER'])) || ! (($_SERVER['PHP_AUTH_USER'] == $LOGIN) && ( $_SERVER['PHP_AUTH_PW'] == "$PASSWORD" )) ) {

   header("WWW-Authenticate: Basic entrer="Form2txt admin"");

   header("HTTP/1.0 401 Unauthorized");

   error("Musisz podac login i hasło!");

}

?>

[...]


kiedy wywoluje ten skrypt, wywala mi taki komunikat:

Kod
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, xxx@xxxxxx.xx and inform them of the time the error occurred, and anything you might have done that may have caused the error.



More information about this error may be available in the server error log.







--------------------------------------------------------------------------------



Apache/1.3.14 Server at localhost Port 80


"...misconfiguration..." - szukalem w konfiguracj (tzn. php.ini) i nie widze tam zadnego bledu... czy ktos wie jak ten problem "zabic";) A moze wystarczy jakis patch albo cos...

ps.

Cytat
manual napisal:
Autoryzacja HTTP nie działa jeśli używasz serwera Microsoft IIS i php w wersji CGI.


qrka bo zwatpilem... chodzi o to, ze PHP_AUTH_USER na Microsoft IIS + php w wersji CGI nie dziala, czy nie dziala na Microsoft IIS i nie dziala na php w wersji CGI?? :/
Go to the top of the page
+Quote Post

Posty w temacie
- wassago   PHP_AUTH_USER - nie dziala na PHP4.2.1   31.03.2003, 10:43:54
- - wassago   ????   1.04.2003, 11:20:42
- - rafkam   Re: ????   2.04.2003, 10:02:39
- - uboottd   Internal Server Error The s...   3.04.2003, 08:58:19
- - wassago   no ok.. ale co zmienic w cfg apacha aby autoryzacj...   4.04.2003, 09:58:35


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 13.10.2025 - 22:00