[CentOS] PHP issue on Centos

Scott Sharkey ssharkey at linuxunlimited.com
Thu Sep 8 11:23:07 UTC 2005

ABOKHALAF, Nassri Abdellatif wrote:
> Hello all,
> I’m trying to configure a web development & content management 
> application called siteseed under centos 4.1
> My centos install is a minimal with httpd, mysql php added via yum.
> Problem: PHP complains with errors that look like :
>] PHP Notice:  Undefined variable:  article_comment in 
> /var/www/html/siteseed/index.php on line 112 [client] PHP 
> Notice:  Undefined variable:  headline in 
> /var/www/html/siteseed/index.php on line 170 [client 
> The mystery  is that this errors only happen in a centos 4.1 install.
> In a default RH9/fedora  install everything works fine.
> All php, mysql, httpd packages are installed with no dependence issue.
> Any help would be appreciated,

There is no "error" per se here - what you have is technically a 
"Notice".  It does not show up under RH9/Fedora because the default 
error reporting level in that distribution is set to ignore "Notices".
The reason it shows up in CentOS 4.1 is because the default error 
reporting level in CentOS 4.1 is set to report all errors, warnings, and 
notices.  Technically, the siteseed developers should be correcting 
these problems as they develop the software, but they probably haven't 
gotten around to it yet.

To make the notices go away, find the file /etc/php.ini.  In that file 
is an entry:

error_reporting = E_ALL

or something similar.  Change it to:

error_reporting = E_ALL & ~E_NOTICE

Which tells it to report all errors, but not notices.  There are several 
other related settings in the same section which you may want to look 
at.  Once you have saved the file, restart the apache web server to
have it take effect.


More information about the CentOS mailing list