![]() |
![]() |
![]()
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?? :/ |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Przyjaciele php.pl Postów: 701 Pomógł: 0 Dołączył: 26.06.2002 Skąd: Londyn Ostrzeżenie: (0%) ![]() ![]() |
(IMG:http://forum.php.pl/style_emoticons/default/sad.gif) oj chyba nikt nie wie jak ten problem rozwiazac...
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 60 Pomógł: 0 Dołączył: 24.06.2002 Ostrzeżenie: (0%) ![]() ![]() |
Cytat (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) oj chyba nikt nie wie jak ten problem rozwiazac...
Mialem podobne problemy Z IIS. Przerzucilem sie na apache i ustawilem php jako modul - żadnych problemów i wszystko szybciej hula. GD2 tez dziala. Apache 1.3.27 php 4.2.3 no i mysql Jedynie taka mam rade Pozdr. Rafkam |
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 384 Pomógł: 0 Dołączył: 3.04.2003 Skąd: Chorzow Ostrzeżenie: (0%) ![]() ![]() |
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. To jest blad apacha, a nie php-a. Tak jak napisane wiecej informacji mozna znalezc w errror-logu apacza. W tym konkretnym przypadku najpewniej bedzie tam wpis "Premature end of script .....", co od razu sugeruje php-a jako CGI. A autoryzacja HTTP nie dziala _ani_ na serwerze IIS, _ani_ w przypadku CGI - wtedy to normalny zewnetrzny skrypt nie majacy zadnego dostepu do zmiennych apacza bo i jak ? (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) Cytat
|
|
|
![]()
Post
#5
|
|
Grupa: Przyjaciele php.pl Postów: 701 Pomógł: 0 Dołączył: 26.06.2002 Skąd: Londyn Ostrzeżenie: (0%) ![]() ![]() |
no ok.. ale co zmienic w cfg apacha aby autoryzacja dzialala?? szukalem jakiejs lini odpowiedzialna za to w cfg ale nic takiego nie znalazlem...
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 24.08.2025 - 21:58 |