Page 1 of 1

Horde using deprecated function?

Posted: 19 Oct 2010, 15:00
by DanielM
Hi.
After fiddling around with postfix settings I thought today I should try Horde out for the first time. I was a bit surprised by the amount of mail I get. Every fifth minute I get a mail from Cron Daemon saying

Code: Select all

PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/share/horde3/lib/Horde/Perms/sql.php on line 83
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/share/horde3/lib/Horde/Perms/sql.php on line 116
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/share/horde3/lib/Horde/Perms/sql.php on line 153
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/share/horde3/lib/Horde/Prefs.php on line 847
(it continues further in the same fashion). Did I do something wrong here or what's happening?

/Daniel

edit: I actually found that this is caused by the first line in /etc/cron.d/bubba-horde. Commented out the line to make it shut up. Bit of a workaround, but it gives me less mail to delete tomorrow...

Re: Horde using deprecated function?

Posted: 19 Oct 2010, 15:30
by 6feet5
Hi,

Instead of commenting out the whole line, you could try redirecting the output of the command to /dev/null. That should prevent the mail from being sent.

A downside is you will not be notified of any other (perhaps bigger) problem if they occur.

/Johan

Re: Horde using deprecated function?

Posted: 19 Oct 2010, 15:47
by DanielM
6feet5 wrote:Hi,

Instead of commenting out the whole line, you could try redirecting the output of the command to /dev/null. That should prevent the mail from being sent.

A downside is you will not be notified of any other (perhaps bigger) problem if they occur.

/Johan
Feels like just another workaround. I guess the best thing would be if Horde wouldn't use deprecated stuff. Anyone knows how I get php to at least stop complaining about it?

/Daniel

Re: Horde using deprecated function?

Posted: 19 Oct 2010, 16:58
by 6feet5
DanielM wrote:Feels like just another workaround.
True, with the difference that my workaround actually do some work ;-)

/Johan

Re: Horde using deprecated function?

Posted: 26 Oct 2010, 05:16
by pcrene
Hello All,

what file should i edit to add the: /dev/nul

Rene

Re: Horde using deprecated function?

Posted: 26 Oct 2010, 05:21
by DanielM
pcrene wrote:what file should i edit to add the: /dev/nul
In the file /etc/cron.d/bubba-horde, the last line ends with

Code: Select all

 > /dev/null 2>&1
Put the same thing after the first line (ie the first line that actually does something) so it looks like this:

Code: Select all

*/5 * * * *    root    test -x /usr/bin/php && /usr/bin/php /usr/share/horde3/scripts/alarms.php  > /dev/null 2>&1
That should make the warnings go to the black hole instead of to your mail box.

/Daniel

Re: Horde using deprecated function?

Posted: 31 Oct 2010, 12:19
by Ubi
I just receive my B3, but man this bug is a pain. My guess is everyones mailqueue is running into 10000s mails by now because of this crap. Thanks for the quickfix

Ubi

Re: Horde using deprecated function?

Posted: 17 Mar 2011, 10:34
by Fourwinds
I ran into this bug today and then did some googleing around and came up with:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=601186

It appears it is a known Horde issue and not an Excito one ... The solution that they have is to suppress the deprecated warnings, and also the strict warnings by updating:

/etc/horde/horde3/conf.php

and changing line 6 from:

$conf['debug_level'] = E_ALL;

to

$conf['debug_level'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT;