Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99131 - horde-imp nonfunctional with the latest apache/php
Summary: horde-imp nonfunctional with the latest apache/php
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
: 99761 106769 112911 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-15 10:35 UTC by Jan Hrabe
Modified: 2005-11-18 06:20 UTC (History)
4 users (show)

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


Attachments
Patch to get horde & friends working correctly with PHP 4.4 (horde.patch,3.87 KB, patch)
2005-08-03 09:26 UTC, Jason Frank
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hrabe 2005-07-15 10:35:26 UTC
After emerge -uD world 2 days ago (7/13), the horde-imp stopped working. 
Instead of the usual inbox page, I now get these messages:

Notice: Only variable references should be returned by reference in
/var/www/localhost/htdocs/horde/lib/Prefs.php on line 144
Warning: session_regenerate_id(): Cannot send session cookie - headers already
sent by (output started at /var/www/localhost/htdocs/horde/lib/Auth.php:80) in
/var/www/localhost/htdocs/horde/lib/Horde.php on line 886
Notice: Only variable references should be returned by reference in
/var/www/localhost/htdocs/horde/lib/Prefs.php on line 144
Warning: Cannot modify header information - headers already sent by (output
started at /var/www/localhost/htdocs/horde/lib/Auth.php:80) in
/var/www/localhost/htdocs/horde/imp/redirect.php on line 106

I tried re-emergeing horde-imp and running revdep-rebuild, no improvement.
In /etc/apache2/confphp.ini, there is a path specification
include_path = ".:/usr/lib/php:/usr/lib/php/php"

Curiously, there seem to be at least two different versions of Auth.php 
that emerge put in 3 different locations
/var/www/localhost/htdocs/horde/lib/Auth.php
/usr/lib/php/PEAR/Command/Auth.php
/usr/share/webapps/horde/2.2.8/htdocs/lib/Auth.php


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Jason Frank 2005-07-17 11:59:20 UTC
Unfortunately, versions of horde less than the unreleased 3.05 release are
incompatible with PHP version 4.4 (which your emerge most likely installed for
you.)  About your only choice is to downgrade your PHP, which will, of course,
introduce security issues.  Sorry about that.
Comment 2 Julius Loman 2005-07-18 02:05:53 UTC
(In reply to comment #1)
> Unfortunately, versions of horde less than the unreleased 3.05 release are
> incompatible with PHP version 4.4 (which your emerge most likely installed for
> you.)  About your only choice is to downgrade your PHP, which will, of course,
> introduce security issues.  Sorry about that.

which version of horde should I use ? emerging latest unstable horde causes same
problems (horde-3.0.4-r1) 
Comment 3 Jason Frank 2005-07-18 15:01:15 UTC
According to my original comment, you ned horde 3.05, which isn't released.   So
I would expect 3.04 not to work.  You need to downgrade PHP to get it to work,
as I stated in my original comment.

(In reply to comment #2)
> (In reply to comment #1)
> > Unfortunately, versions of horde less than the unreleased 3.05 release are
> > incompatible with PHP version 4.4 (which your emerge most likely installed for
> > you.)  About your only choice is to downgrade your PHP, which will, of course,
> > introduce security issues.  Sorry about that.
> 
> which version of horde should I use ? emerging latest unstable horde causes same
> problems (horde-3.0.4-r1) 

Comment 4 Sumit Khanna 2005-07-19 14:29:50 UTC
The problem arrises with functions that should return variables but instead
return things like true/false.

Example

function some_func() {
  if($something) {
    return false;
  }
}


In the case something like this throws a warning, it needs to be replaed with:

function some_func() {
  if($something) {
    $tmpvar = false;
    return $tmpvar;
  }
}

Horde should have a fix for it...I mean it's easy enough to fix. For right now,
a simple hack is to go into the source files and change all those return
statements until the new version is placed in portage
Comment 5 Mike Nerone 2005-07-19 15:24:55 UTC
Would it not make sense to modify the horde dependencies to require
<(mod_)php-4.4 until the new version is available? This is what DEPENDS are for,
even if this must be done conditionally in the eclass. This is gonna bite
everybody (it bit me)!
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2005-07-21 02:01:20 UTC
*** Bug 99761 has been marked as a duplicate of this bug. ***
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2005-07-21 02:16:28 UTC
*** Bug 99761 has been marked as a duplicate of this bug. ***
Comment 8 Julien Allanos (RETIRED) gentoo-dev 2005-07-21 02:34:24 UTC
Note that horde-3.0.5-rc1 is available since 11/07, so impatient users might be
able to create a working ebuild for it, using the existing one.
Comment 9 SpanKY gentoo-dev 2005-07-28 07:36:52 UTC
i'll just unmask the horde-3 stuff
Comment 10 Jason Frank 2005-08-03 09:26:06 UTC
Created attachment 64995 [details, diff]
Patch to get horde & friends working correctly with PHP 4.4

This patch fixes all of the bugs that I've run into with PHP 4.4 and the Horde
suite.	I doubt that I've found all of them but at least basic functionality is
restored.
Comment 11 David Röhr 2005-08-07 08:05:26 UTC
Found one more (should be added to the patch)

In horde/lib/Prefs.php

Around line 167.

if (class_exists($class)) {
   return new $class($user, $password, $scope, $params, $caching);

Should be

if (class_exists($class)) {
   $tempClass = new $class($user, $password, $scope, $params, $caching);
   return $tempClass;

horde 3.0.5 was released today, maybe it can be added to stable? The patches
should at least be added.
Comment 12 SpanKY gentoo-dev 2005-08-07 14:58:04 UTC
3.0.5 now in portage
Comment 13 SpanKY gentoo-dev 2005-09-21 05:29:56 UTC
*** Bug 106769 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2005-11-18 06:20:13 UTC
*** Bug 112911 has been marked as a duplicate of this bug. ***