Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP?] hasło do folderów serweru, ...a moze skrypt?
Remes
post 6.11.2008, 21:12:33
Post #1





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 17.05.2006

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


witam,
chciałem się poradzić czy lepiej ustawić dostęp do jakiegoś z folderów w którym miałbym pliki ktore chce udostępnić grupie znajomych i zabezpieczyć go np hasłem i nazwą użytkownika (najlepiej aby wyskakiwało podobne okienko jak prze logowaniu do ftp przez przeglądarkę) czy użyć do tego jakiegoś prostego skryptu?

z góry dzięki za pomoc...
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
nexis
post 6.11.2008, 21:15:10
Post #2





Grupa: Zarejestrowani
Postów: 1 012
Pomógł: 109
Dołączył: 26.09.2003
Skąd: nexis.pl

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


.htaccess
Kod
AuthName "Podaj hasło"
AuthType Basic
AuthUserFile /sciezka_do_katalogu/.htpasswd
Require valid-user


.htpasswd
Kod
uzytkownik1:haslo1
uzytkownik2:haslo2


Generator haseł .htpasswd


--------------------
Zend Certified Engineer

Kliknij POMÓGŁ jeśli moja odpowiedź okazała się użyteczna!
Go to the top of the page
+Quote Post
Remes
post 6.11.2008, 23:25:59
Post #3





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 17.05.2006

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


Kod
Internal Server Error

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

Please contact the server administrator, postmaster@**********.info 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.


WTF?

juz opanowane

Kod
'AuthUserFile' /home/twój_login_ftp/'ścieżka dostępu do pliku .htpasswd'/.htpasswd
'AuthGroupFile' /dev/null
'AuthName' "Acces Restreint"
'AuthType' Basic

require valid-user


W przypadku ofert Start oraz 1000GP ścieżka dostępu jest inna. Mozna ja sprawdzic dzieki utworzeniu stronki z tym skryptem:
  1. <?php
  2. print dirname(__FILE__);
  3. ?>


Ten post edytował Remes 6.11.2008, 23:25:44
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 24.07.2025 - 18:34