Ubuntu下LAMP的PHP错误提示的开启

运维 系统运维
Ubuntu下LAMP的PHP错误提示的开启:Linux的发行版Ubuntu中,Ubuntu下LAMP默认的php的语法错误提示是没有开启的,应该如何开启LAMP的错误提示呢?需要修改以下几个地方。

  开启ubuntulamp的php错误提示

  ubuntu下默认的lamp模式是没有php语法错误提示的,如果要开启,需要修改几个地方:

  1. 打开php.ini文件。

  这个文件在: /etc/php5/apache2 目录下,需要修改这个文件的权限才能写入。

  1.   sudo chmod 777 /etc/php5/apache2/php.ini  
  2.  

  2. 搜索并修改下行,把Off值改成On

  1.   display_errors = Off 
  2.  

  3. 搜索下行

  1.   error_reporting = E_ALL & ~E_NOTICE  
  2.  

  或者搜索:

  1.   error_reporting = E_ALL & ~E_DEPRECATED  
  2.  

  修改为

  1.   error_reporting = E_ALL | E_STRICT  
  2.  

  4. 修改Apache的 httpd.conf,

  这个文件在:/etc/apache2/ 目录下,这是一个空白文件,同样这个文件也需要修改权限。

  1.   sudo chmod 777 /etc/apache2/ httpd.conf  
  2.  

  添加以下两行:

  1.   php_flag display_errors on  
  2.  
  3.   php_value error_reporting 2039  
  4.  

  5. 重启Apache,就OK了。

  重启命令:

  1. sudo /etc/init.d/apache2 restart  
  2.  

  ok! 错误提示成功开启!以上就是Ubuntu下LAMP的PHP错误提示的开启方法。

【编辑推荐】

Ubuntu下LAMP的配置

Ubuntu下LAMP配置文件路径

CentOS下安装LAMP的方法

 

责任编辑:zhaolei 来源: javaeye
相关推荐

2011-03-10 10:09:09

UbuntuLAMP搭建

2011-03-09 15:13:00

UbuntuLAMP配置

2011-03-09 15:44:14

UbuntuLAMP

2011-03-11 10:27:45

UbuntuLAMP配置

2011-03-14 11:29:43

2011-03-14 13:38:40

LAMPApache调优

2011-03-21 16:21:21

ubuntulamp

2011-03-09 15:25:36

UbuntuLAMPPHPadmin

2011-03-14 13:07:23

Ubuntu安装LAMP

2011-03-11 10:39:07

LAMPPHP

2011-03-14 10:30:15

Ubuntu10.04LAMP

2011-03-11 12:57:36

UBUNTU10.10安装LAMP

2011-03-10 08:59:04

Ubuntu安装LAMP

2011-03-21 16:37:57

2011-03-08 10:35:23

2011-03-11 10:09:59

UbuntuLAMP路径

2011-03-22 10:25:54

UbuntuLAMP

2011-03-21 13:59:44

Apachemysqlphp

2009-12-10 16:14:53

屏蔽PHP错误提示

2021-01-22 15:18:21

UbuntuLinuxApache
点赞
收藏

51CTO技术栈公众号