PHP错误不显示在浏览器[Ubuntu的10.10] [英] PHP errors NOT being displayed in the browser [Ubuntu 10.10]

查看:129
本文介绍了PHP错误不显示在浏览器[Ubuntu的10.10]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的PHP和整个LAMP堆叠,但我已经成功地得到它,并我的Ubuntu 10.10系统上运行。一切似乎都在浏览器的错误转贴除外一起工作,我似乎无法获得工作(和我不能没有工作!)。

I'm new to PHP and the whole LAMP stack but I've managed to get it up and running on my Ubuntu 10.10 system. Everything seems to be working with the exception of error reposting in the browser which I just can't seem to get working (and which I can't work without!).

我读过一些文章和其他线程这表明,以下值应该在文件中适用 /etc/php5/apache2/php.ini

I've read a number of article and other threads which indicate that the following values should be applied in the file /etc/php5/apache2/php.ini:


  • 的display_errors =开

  • display_startup_errors =开

  • display_errors = On
  • display_startup_errors = On

我已经重新启动的Apache2,甚至重新启动我的电脑,但对我的生活我只是无法得到它的工作。我甚至已经使用的phpinfo()函数报告,这些设置是为我设置了他们,所以我知道它拿起正确的配置文件,但没有试过!

I've restarted apache2 and even restarted my computer but for the life of me I just can't get it working. I've even tried using phpinfo() function which reports that these settings are as I've set them so I know it's picking up the correct configuration file but nothing!

任何帮助将受到欢迎。

推荐答案

不要只允许在php.ini文件的display_errors 中第一次出现。请确保您向下滚动到真实的设置,它从关闭更改为

Don't just enable the first occurrence of display_errors in the php.ini file. Make sure you scroll down to the "real" setting and change it from Off to On.

的事情是,如果你解决不断变化的(即取消注释+添加 =在)通过的display_errors的第一个出现您的更改将某处在哪里把它设置为关闭再行480覆盖。

The thing is that if you settle with changing (i.e. uncomment + add = On) by the very first occurrence of display_errors your changes will be overwritten somewhere on line 480 where it's set to Off again.

这篇关于PHP错误不显示在浏览器[Ubuntu的10.10]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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