Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php HTTP认证在firefox中有效,但在google chrome上无效_Php_Html_.htaccess_Google Chrome - Fatal编程技术网

Php HTTP认证在firefox中有效,但在google chrome上无效

Php HTTP认证在firefox中有效,但在google chrome上无效,php,html,.htaccess,google-chrome,Php,Html,.htaccess,Google Chrome,我有一个网站使用http身份验证和.htaccess 这在Firefox中工作得很好,但在使用正确密码的Chrome上却不起作用 .htaccess代码 AuthUserFile /web/posefauxcils/revuedigitale/htpasswd.txt AuthName "Acces protege" AuthType Basic Require valid-user htpasswd.txt中的密码用 crypt($_POST['pass'], '4kp') 尝试将文件ht

我有一个网站使用http身份验证和.htaccess 这在Firefox中工作得很好,但在使用正确密码的Chrome上却不起作用

.htaccess代码

AuthUserFile /web/posefauxcils/revuedigitale/htpasswd.txt
AuthName "Acces protege"
AuthType Basic
Require valid-user
htpasswd.txt中的密码用

crypt($_POST['pass'], '4kp')

尝试将文件htpasswd.txt更改为.htpasswd

.htaccess应包含:

AuthName "Page d'administration protégée"
AuthType Basic
AuthUserFile "/home/site/www/admin/.htpasswd"
Require valid-user
然后在.htpasswd中:

login:crypted_passord
要查看您加密的密码,请执行以下操作:

<?php echo crypt('yourpass'); ?>


“不起作用”不起作用,到底是什么,现在是什么?浏览器要求用户和密码才能访问网站。使用firefox,没问题,我进入了网站。使用google chrome,我输入了正确的用户和密码,但它会再次询问凭据。我尝试输入加密的密码,但没有更改。我尝试更改文件名和.htaccess,但没有更改:/