我使用PHP5作为模块运行Apache Web服务器(注意:作为Apache模块,而不是CGI!)。
在我的一些.htaccess文件(gallery3软件, http: //gallery.menalto.com/)中,有php_value和php_flag语句。
当试图访问该文件夹中的文件时,它们会导致500服务器错误。 所以我编辑了我的apache2.conf并添加了这些行:
<Directory /my/gallery/folder> AllowOverride All </Directory>
我做错了什么吗? 我允许重写,我运行PHP作为Apache模块。 为什么保持error.log告诉我php_value not allowed here
?
尝试在虚拟主机中添加“ Directory ”指令,而不是在默认的apache2.conf中。 另外,如果这是在Ubuntu / Debian中,如果您没有使用任何其他虚拟主机,则需要在/ etc / apache2 / sites-available / default中进行更改。
如果您使用XAMPP来将DocumentRoot弯曲到/ Users / USERNAME / Sites,那么需要另外一个apacheconfiguration文件来处理:
/Applications/XAMPP/etc/extra/httpd-userdir.conf
它定义了/ Users / * / Sites的AllowOverride设置
AllowOverride FileInfo AuthConfig Limit Indexes
也许这个提示也适用于其他的AMP堆栈。