我正在使用Codeigniter3.0.4,现在更改为使用的mac计算机和Xampp服务器但是我收到了以下错误。
[Tue Mar 01 22:31:29.108763 2016] [core:crit] [pid 2115](13)权限被拒绝:[client :: 1:56770] AH00529:/ Applications / XAMPP / xamppfiles / htdocs / dw_php- json-js / .htaccess pcfg_openfile:无法检查htaccess文件,确保它是可读的并且'/ Applications / XAMPP / xamppfiles / htdocs / dw_php-json-js /'是可执行的
答案 0 :(得分:0)
首先,您应该确定正在运行的用户XAMPP。然后你应该通过在终端上运行它来找出用户所属的组:
groups <username>
其中<username>
是用户XAMPP正在运行的地方。
然后,您可以检查错误消息中提到的文件的权限和所有权:
# Check owner and permissions for .htaccess file:
ls -al /Applications/XAMPP/xamppfiles/htdocs/dw_php-json-js/.htaccess
# Check owner and permissions of containing directory
ls -l /Applications/XAMPP/xamppfiles/htdocs/dw_php-json-js/
此类命令的示例输出为:
# Command: ls -l /Applications/iTunes.app/Contents
-rw-r--r-- 1 root wheel 521 16 Oct 12:48 version.plist
它告诉你所有者是root,组是wheel。用户具有rw
(读取和写入)访问权限,该组中的任何人都具有r
(读取)访问权限,并且每个人都有r
个访问权限。
要根据您收到的错误消息确保权限正确,您需要确保用户可以读取.htaccess
且该目录是可执行的(在{x
旁边显示r
1}}和w
)。