Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/285.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.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 配置错误中未指定AuthUserFile?_Php_.htaccess - Fatal编程技术网

Php 配置错误中未指定AuthUserFile?

Php 配置错误中未指定AuthUserFile?,php,.htaccess,Php,.htaccess,我的错误日志文件中出现错误“配置中未指定AuthUserFile”。如何修复它。 这是我的.htaccess文件,它位于amazon文件服务器中 ## mod auth_mysql AuthBasicAuthoritative Off AuthMYSQL on AuthMySQL_Authoritative on AuthMySQL_DB dbname Auth_MySQL_Host localhost Auth_MySQL_User username Auth_MySQL_Password p

我的错误日志文件中出现错误“配置中未指定AuthUserFile”。如何修复它。 这是我的.htaccess文件,它位于amazon文件服务器中

## mod auth_mysql
AuthBasicAuthoritative Off
AuthMYSQL on
AuthMySQL_Authoritative on
AuthMySQL_DB dbname
Auth_MySQL_Host localhost
Auth_MySQL_User username
Auth_MySQL_Password password
AuthMySQL_Password_Table tbl_name
AuthMySQL_Username_Field user_name
AuthMySQL_Password_Field password
AuthMySQL_Empty_Passwords off
AuthMySQL_Encryption_Types SHA1Sum
# Standard auth stuff
AuthType Basic
AuthName "restricted zone"

Require valid-user

该错误不是指
.htaccess
,而是指主
httpd.conf
Apache配置文件。将该行添加到您的
httpd.conf
中,然后重新启动
httpd
服务。

您只需在

AuthUserFile /dev/null
在您的.htaccess中。这对我来说是个好办法

对于auth_mysql配置带来的其他痛苦,我完全理解:)