Jump to content
php.lv forumi

htpasswd neiet


Jay Kay

Recommended Posts

.htpasswd atrodas virs public_html un tā saturs:

qwerty:qwerty1

 

.htaccess jau tika veiksmīgi tika lietots pirms tam ilgu laiku priekš mod_rewrite. htaccess saturs:

AuthName "Restricted access"
AuthType Basic
AuthUserFile /home/i/iniciaw/.htpasswd
Require valid-user
DirectoryIndex index.php

 

index.php failā veicu papildus pārbaudi, lai pārliecinātos, ka path ir pareizs:

<?php
print '<pre>';
print_r($_SERVER)."<br>";
print '</pre>';
if(file_exists('/home/i/iniciaw/.htpasswd'))
print "eksistē";
else
print "neexistē";
?>

 

[php_AUTH_USER] => qwerty

[php_AUTH_PW] => qwerty1

arī ir pareizi, taču logins nav pareizs un visu prasa vēlreiz

 

lūdzu, palīdziet!

Link to comment
Share on other sites

Un kā tu hešoji?

 

es izmantoju šo:

http://www.askapache.com/online-tools/htpasswd-generator/

 

un uzģenerēju šo:

qwerty:Protected by AskApache:d07c3825a14f138dc9d25ba1e10d7af2
qwerty:{SHA}rXCrl64TduZWACZBz7BnyclJBqI=
qwerty:$9GvMtqEBP0Zo
qwerty:$apr1$v75wgbfj$QxxnRxY/shigiev2cQjFa0
qwerty:qwerty1

 

es, proams, mēģināju gan atsevišķi pa vienam, gan visus kopā.

Edited by Jay Kay
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...