简体   繁体   English

php_value display_errors 0导致.htaccess中出现500错误

[英]php_value display_errors 0 causes 500 error in .htaccess

When i uncomment the display_errors line in .htaccess the page throws an internal 500 error. 当我取消注释.htaccess中的display_errors行时,该页面将引发内部500错误。

I have turned every single line on one by one to see where the issue was. 我将每一行一行一行地查看,以查看问题所在。 But it throws an error only when php_value is active. 但是,仅当php_value处于活动状态时,它才会引发错误。 The thing i don't understand is, this file has worked before. 我不明白的是,此文件之前已经工作过。 But since today it no longer works. 但是从今天起它不再起作用。

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
ErrorDocument 403 /403.php
#php_value display_errors 0
Options -Indexes

<FilesMatch "^\.">
require all denied
</FilesMatch>
<Files .htaccess>
require all denied
</Files>
<FilesMatch "database\.php|functions\.php|htmlfunctions\.php|footer\.php|header\.php">
 require all denied
</FilesMatch>```

try php_flag display_errors off 尝试php_flag display_errors off

You may need to allow override for your htaccess 您可能需要允许htaccess覆盖

please see: https://php.net/manual/en/configuration.changes.php 请参阅: https : //php.net/manual/en/configuration.changes.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM