无法获得支持PHP的display_errors [英] Cannot get php display_errors enabled

查看:197
本文介绍了无法获得支持PHP的display_errors的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我知道有关于这个主题的几个帖子,我已经走遍所有!

Hey i know there are a few posts regarding this topic and i have scoured them all!

我无法不启用的display_errors在PHP设置,无论我做什么!

I cannot not enable the display_errors setting in php no matter what i do!!!

即时通讯使用与运行的Apache2安装了PHP 5.3虚框。我已经试过各种我能想到的获得显示错误的工作,但似乎没有任何工作。

Im using virtual box with php 5.3 installed with apache2 running. i have tried everything i can think of to get display errors working but nothing seems to work.

我已经在我的.htaccess文件中设置的php_flag的display_errors我甚至在php.ini文件中直接启用了

I have set php_flag display_errors on in my .htaccess file i have even enabled it directly in the php.ini file

display_errors = 1

和也试过

display_errors = On

我使用的是默认的Apache网站的启用,是不是我需要在这里做的就是这个工作?我从来没有使用MAMP我的Mac上运行PHP这个问题。

I am using the defaults for apache sites-enabled is there something i need to do here to get this to work?? i have never had this problem running php on my mac using mamp.

任何建议将是极大的AP preciated这是推动我疯了!

Any suggestions would be greatly appreciated this is driving me nuts!

推荐答案

您也可以在你的PHP脚本启用它通常是:

You can also enable it in your PHP script usually:

ini_set("display_errors", 1);
ini_set("track_errors", 1);
ini_set("html_errors", 1);
error_reporting(E_ALL);

如果没有帮助,那么第一次尝试一个快速的解决方法:

If that doesn't help, then try a quick workaround first:

set_error_handler("var_dump");

可用于复制原始的行为,如果它是由一些其他情形pssed SUP $ P $

Could be used to replicate the original behaviour, if it's suppressed by some other circumstance.

参加记住,这仅适用于启用的运行时错误的。如果您怀疑的解析错误的,你一定要能够在 PHP错误显示。 INI / <一个href=\"http://stackoverflow.com/questions/6127980/enabling-error-display-in-php-via-htaccess-only\">.htaccess / .user.ini 。 - 否则让一个包装 test.php的脚本上面的说明,那么包括()有故障的剧本

Take in mind, this only works for enabling runtime errors. If you suspect parse errors, you'll definitely have to enable error display in the php.ini / .htaccess / .user.ini. -- Else make a wrapper test.php script with above instructions, then include() the faulty script.

这篇关于无法获得支持PHP的display_errors的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆