[imp] How to debug a 'syslog' error ... ?

Darragh Bailey felix at compsoc.nuigalway.ie
Mon Nov 29 05:25:29 PST 2004


Quoting "Marc G. Fournier" <scrappy at hub.org>:

> On Mon, 29 Nov 2004, Jan Schneider wrote:
>
> > Zitat von "Marc G. Fournier" <scrappy at hub.org>:
> >
> >> Whenever I access my inbox, I get:
> >>
> >> [Sat Nov 27 18:38:06 2004] [error] PHP Notice:  Use of undefined constant
> >> - assumed '' in /usr/local/share/pear/Log/syslog.php on line 150
> >
> > You should know Horde long enough to see that this has nothing to do with
> > Horde.
>
> The error is only generated when I click on the INBOX/Mail link in IMP ...
> how is that not related to Horde?  Its the only section out of all the
> ones I sent through that generates those errors ... *puzzled look*
>

Because you should see that its related to the PEAR system. If you examine it
further you'd realise its due to certain PHP behaviour, take the following
extract from a php.ini file

; E_NOTICE   - run-time notices (these are warnings which often result from
;       bug in your code, but it's possible that it was intentional (e.g.,
;       using an uninitialized variable and relying on the fact it's
;       automatically initialized to an empty string)

PEAR and other PHP applications sometimes rely on this trick to determine
whether certain files have been included or various settings need to be checked.
You could go to the PEAR developers and ask them to change this behaviour but in
most cases people just use the following value in their ini file:
error_reporting = E_ALL & ~E_NOTICE  ; Show all errors except for notices

To disable the notices that occur due to this behaviour. Personally I think if
you receive such messages from code then it should be modified so that you never
need to rely on uninitialized variables.

--
Darragh

"Nothing's foolproof to a sufficently talented fool"


More information about the imp mailing list