Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100915 - phppgadmin-3.5.5 prints "Notice:..." on pages, although error_reporting = E_ALL & ~E_NOTICE
Summary: phppgadmin-3.5.5 prints "Notice:..." on pages, although error_reporting = E...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-31 11:15 UTC by Ivan Yosifov
Modified: 2005-09-27 00:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Yosifov 2005-07-31 11:15:38 UTC
Php should not print notices on pages:

home ~ # grep ^error_reporting /etc/php/apache2-php4/php.ini
error_reporting  =  E_ALL & ~E_NOTICE
home ~ #

However, when I log into phppgadmin-3.5.4 I see in the sidebar: 

Notice: Only variable references should be returned by reference in
/var/www/localhost/htdocs/phppgadmin/classes/database/Postgres80.php on line 74

I have so far reproduced this with phppgadmin, but I suspect it affects all php
code.


Reproducible: Always
Steps to Reproduce:




Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer
-momit-leaf-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c
/etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer
-momit-leaf-frame-pointer -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.ITDNet.net/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acl alsa apache2 avi berkdb bitmap-fonts bonobo cdr crypt cups curl
directfb doc dvd dvdr eds emboss encode flac foomaticdb gd gdbm gif gnome gpm
gstreamer gtk gtk2 guile hal imagemagick imlib ipv6 ithreads java jpeg junit kde
kdeenablefinal ldap libg++ libwww mad mikmod mmap mmx motif mozilla mp3 mpeg
mysql ncurses nls nptl nvidia ogg oggvorbis opengl pam pdflib perl pic plotutils
png postgres pthreads python qt quicktime readline sdl session sharedmem spell
sse sse2 ssl svga symlink tcltk tcpd tetex threads tiff truetype truetype-fonts
type1-fonts unicode usb vorbis win32codecs xml xml2 xmms xv zlib linguas_en
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS
Comment 1 Ivan Yosifov 2005-07-31 11:17:27 UTC
php is 4.4.0, mod_php is 4.4.0-r1
Comment 2 Ivan Yosifov 2005-07-31 13:20:08 UTC
This bug is similar to bug #99391, but I don't think it is a dupe - according to
"error_reporting" no notices should appear at all.
Comment 3 Sebastian Bergmann (RETIRED) gentoo-dev 2005-07-31 21:34:37 UTC

*** This bug has been marked as a duplicate of 99391 ***
Comment 4 Ivan Yosifov 2005-08-01 02:41:25 UTC
Can you please explain why is this bug a duplicate ?
As you have adviced on #99391, I have disabled notice reporting (
error_reporting  =  E_ALL & ~E_NOTICE ) but I still see the notice.
Comment 5 Sebastian Bergmann (RETIRED) gentoo-dev 2005-08-01 03:03:04 UTC
What I meant with "disable error reporting" is setting display_errors = Off.
Comment 6 Sebastian Bergmann (RETIRED) gentoo-dev 2005-08-01 03:10:04 UTC
The following script

    <?php
    class Foo {
            function &bar() {
                    $bar = new Bar;
                    return $bar->baz();
            }
    }
    
    class Bar {
            function &baz() {
                    return new StdClass;
            }
    }
    
    $foo = new Foo;
    $foo->bar();
    ?>

does not print a E_NOTICE with E_ALL & ~E_NOTICE for me. It does print the
notice with E_ALL. This is the expected and correct behaviour.

Are you sure that you are really using E_ALL & ~E_NOTICE and do not override
this setting (via .htaccess, for example) somewhere?
Comment 7 Ivan Yosifov 2005-08-01 03:46:00 UTC
I placed the script in a test dir and it does not print a notice with
error_reporting set in php.ini to E_ALL & ~E_NOTICE and does with E_ALL, like it
should. 
Placing display_errors = Off in php.ini silenced the notices too.
Unfortunately, using display_errors = Off globally is a bad idea since the
machine is used for web development and this will make debugging difficult.
I tried placing display_errors = Off in .htaccess in the phppgadmin dir, but
this did not work. A grep in phppgadmin dir shows that phppgadmin may be
overriding global error reporting config:

home phppgadmin # grep error_reporting -R *
lang/langcheck: error_reporting(E_ALL);
libraries/adodb/adodb-errorpear.inc.php:        if (error_reporting() == 0)
return; // obey @ protocol
libraries/adodb/drivers/adodb-ado.inc.php:              if ($this->hideErrors) 
$olde = error_reporting(E_ERROR|E_CORE_ERROR);// sometimes $f->value be null
libraries/adodb/drivers/adodb-ado.inc.php:              if ($this->hideErrors)
error_reporting($olde);
libraries/adodb/adodb-time.inc.php:     error_reporting(E_ALL);
libraries/adodb/adodb-errorhandler.inc.php:     if (error_reporting() == 0)
return; // obey @ protocol
libraries/lib.inc.php:  error_reporting(E_ALL);
home phppgadmin #

Is the phppgadmin overriding of error_reporting expected and correct behaviour ?
How can I use .htaccess to disable error reporting for phppgadmin only ?
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2005-08-25 10:13:06 UTC
Re-assigning a misassigned bug, not a PHP bug. Also, 3.5.5 is in portage, you
might try the new version.
Comment 9 Ivan Yosifov 2005-08-26 05:34:01 UTC
Upgraded to 3.5.5, still getting the notices.
Comment 10 Daniele 2005-09-26 13:14:50 UTC
As explained by this topic
http://forums.gentoo.org/viewtopic-p-2737911.html#2737911
it's a problem in the php code...who should fix it? Gentoo or phpPgAdmin team?
Comment 11 Ivan Yosifov 2005-09-27 00:55:09 UTC
This seems fixed now. I am no longer getting the notices.

I have installed:
net-www/apache-2.0.54-r31
dev-lang/php-5.0.5-r1

And error reporting settings are:
error_reporting  =  E_ALL & ~E_NOTICE & ~E_STRICT
display_errors = On

I guess the update to php5 fixed it, I was running php4 before. Closing.