.htaccess:XAMPP中的命令'Auth_MySQL'无效

.htaccess:XAMPP中的命令'Auth_MySQL'无效

问题描述:

My XAMPP version is 5.6.8, PHP 5.6.8, Apache 2.4.12

I have configured a WP website, but when I try to reach the wp-admin panel, in the browser I get "Error 500 - The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script".

In the error log I can see the following error: .htaccess: Invalid command 'Auth_MySQL', perhaps misspelled or defined by a module not included in the server configuration

I figured out I need to load mod_auth_mysql module, however, it turns out it is not compatible with my XAMPP version, so I need a different solution.

.htaccess file as follow:

IndexIgnore *
Order Deny,Allow
AuthName "XXX"
AuthType Basic
Auth_MySQL On
Auth_MySQL_Authoritative on
Auth_MySQL_Host XXX
Auth_MySQL_Username XXX
Auth_MySQL_Password XXX
Auth_MySQL_DB XXX
Auth_MySQL_Password_Table XXX
Auth_MySQL_Username_Field XXX
Auth_MySQL_Password_Field XXX
Auth_MySQL_Encryption_Types PHP_MD5
Auth_MySQL_Password_Clause " AND ACTIVE=1"
Auth_MySQL_Empty_Passwords Off
AuthBasicAuthoritative Off
AuthUserFile /dev/null
require valid-user
Deny from all
Satisfy any

Thank you!

我的XAMPP版本是5.6.8,PHP 5.6.8,Apache 2.4.12 p> \ n

我已经配置了一个WP网站,但当我尝试访问wp-admin面板时,在浏览器中我收到“错误500 - 服务器遇到内部错误而无法完成您的请求。服务器是 重载或CGI脚本中出现错误“。 p>

在错误日志中我可以看到以下错误: .htaccess:无效命令'Auth_MySQL',可能拼写错误或由 一个未包含在服务器配置中的模块 p>

我发现我需要加载mod_auth_mysql模块,但是,事实证明它与我的XAMPP版本不兼容,所以我需要一个不同的解决方案。 p>

.htaccess文件如下: p>

  IndexIgnore * 
Order Deny,Allow 
AuthName“XXX”
AuthType Basic 
Auth_MySQL On \  nAuth_MySQL_Authoritative on 
Auth_MySQL_Host XXX 
Auth_MySQL_Username XXX 
Auth_MySQL_Password XXX 
Auth_MySQL_DB XXX 
Auth_MySQL_Password_Table X  XX 
Auth_MySQL_Username_Field XXX 
Auth_MySQL_Password_Field XXX 
Auth_MySQL_Encryption_Types PHP_MD5 
Auth_MySQL_Password_Clause “AND ACTIVE = 1” 
Auth_MySQL_Empty_Passwords关
AuthBasicAuthoritative关
AuthUserFile的/ dev / null的
require从所有
Satisfy有效的用户
Deny任何
 代码>   pre> 
 
 

谢谢! p> div>

I could not find a compatible build of mod_auth_mysql, so the solution was to remove the directive from .htaccess.