[horde] [kronolith] Errors after upgrade to pecl_http 2 / Horde_Http 2.1.1

Simon Wilson simon at simonandkate.net
Tue May 27 03:50:45 UTC 2014


----- Message from "Jens-U. Mozdzen" <jmozdzen at nde.ag> ---------
    Date: Mon, 26 May 2014 15:54:13 +0200
    From: "Jens-U. Mozdzen" <jmozdzen at nde.ag>
Subject: Re: [horde] [kronolith] Errors after upgrade to pecl_http 2 /  
Horde_Http 2.1.1
      To: horde at lists.horde.org


> Hi all,
>
> Zitat von Jan Schneider <jan at horde.org>:
>> Zitat von Simon Wilson <simon at simonandkate.net>:
>>
>>> ----- Message from Jan Schneider <jan at horde.org> ---------
>>> [...]
>>>> Zitat von simon at simonandkate.net:
>>>>
>>>>>> On 21 May 2014, at 7:55 pm, Simon Wilson <simon at simonandkate.net> wrote:
>>>>>>
>>>>>>
>>>>>> Title / email copied from osdir email exchange...
>>>>>>
>>>>>> Original email exchange:
>>>>>>
>>>>>> After the recent upgrades to Horde_Http and pecl_http our users  
>>>>>> can not add
>>>>>> attendees to an event in Kronolith. In basic view an empty page is shown
>>>>>> where the f/b info should be displayed, while dynamic view  
>>>>>> gives an "Error
>>>>>> when communicating with the server."
>>>>>>
>>>>>> The Apache (Debian Apache/2.2.22, PHP/5.4.4) log file shows:
>>>>>>
>>>>>> "PHP Fatal error: Undefined constant 'http\\Client\\Curl\\AUTH_ANY' in
>>>>>> /usr/share/php/Horde/Http/Request/Factory.php on line 29"
>>>>>>
>>>>>> There is no such constant on this line.
>
> just for the records: I do have the exact same error messages here.
>
> What's interesting: This happens at random when using IMP dynamic  
> view to preview emails - some trigger the bug, some don't.
>
> The constants are in /usr/share/php5/PEAR/Horde/Http/Request/Peclhttp2.php
>
> --- cut here ---
>     protected $_httpAuthSchemes = array(
>         Horde_Http::AUTH_ANY => \http\Client\Curl\AUTH_ANY,
>         Horde_Http::AUTH_BASIC => \http\Client\Curl\AUTH_BASIC,
>         Horde_Http::AUTH_DIGEST => \http\Client\Curl\AUTH_DIGEST,
>         Horde_Http::AUTH_GSSNEGOTIATE => \http\Client\Curl\AUTH_GSSNEG,
>         Horde_Http::AUTH_NTLM => \http\Client\Curl\AUTH_NTLM,
>     );
> --- cut here ---
>
> Changing one line makes the next one break.
>
>>>>>> Is this a bug or is my PEAR or pecl installation somehow messed up? Any
>>>>>> other hints on diagnosing this behaviour?
>
> What bothers me is: I've installed (over and over again)  
> pecl_http-2.0.6.tar, and looking at it's source code, I can see that  
> these constants are to be registered:
>
> --- cut here ---
> # grep -r AUTH_ANY pecl_http-2.0.6/
> ...
> pecl_http-2.0.6/php_http_client_curl.c:  
> REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AUTH_ANY",  
> CURLAUTH_ANY, CONST_CS|CONST_PERSISTENT);
> --- cut here ---
>
> But checking the freshly generated http.so file, I see no trace of  
> those constants:
>
> --- cut here ---
> # grep AUTH_ /usr/lib64/php5/extensions/http.so
> #
> --- cut here ---
>
> It is as if the file didn't get compiled or the macro  
> "REGISTER_NS_LONG_CONSTANT()" acted as a noop?!? The build log of  
> the PECL package shows no hint that anything went wrong:
>
> --- cut here ---
> /bin/sh /tmp/pear/temp/pear-build-rootCnSczq/pecl_http-2.0.6/libtool  
> --mode=compile gcc -std=gnu99  -I. -I/tmp/pear/temp/pecl_http  
> -DPHP_ATOM_INC  
> -I/tmp/pear/temp/pear-build-rootCnSczq/pecl_http-2.0.6/include  
> -I/tmp/pear/temp/pear-build-rootCnSczq/pecl_http-2.0.6/main  
> -I/tmp/pear/temp/pecl_http -I/usr/include/php5  
> -I/usr/include/php5/main -I/usr/include/php5/TSRM  
> -I/usr/include/php5/Zend -I/usr/include/php5/ext  
> -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c  
> /tmp/pear/temp/pecl_http/php_http_client_curl.c -o  
> php_http_client_curl.lo
> libtool: compile:  gcc -std=gnu99 -I. -I/tmp/pear/temp/pecl_http  
> -DPHP_ATOM_INC  
> -I/tmp/pear/temp/pear-build-rootCnSczq/pecl_http-2.0.6/include  
> -I/tmp/pear/temp/pear-build-rootCnSczq/pecl_http-2.0.6/main  
> -I/tmp/pear/temp/pecl_http -I/usr/include/php5  
> -I/usr/include/php5/main -I/usr/include/php5/TSRM  
> -I/usr/include/php5/Zend -I/usr/include/php5/ext  
> -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c  
> /tmp/pear/temp/pecl_http/php_http_client_curl.c  -fPIC -DPIC -o  
> .libs/php_http_client_curl.o
> --- cut here ---
>
> Nothing else points to an error in the remainder of that log either.
>
>>>>> [...]
>>>>> Any ideas? Should I log a bug report?
>>>>>
>>>>> Simon
>>>>
>>>> No, because it still doesn't make any sense. The file that  
>>>> triggers the error is only loaded if the \http\Client class  
>>>> exists, which only exists in pecl_http 2. And this version always  
>>>> contains the constant that PHP complains about. So you must have  
>>>> either a completely broken PHP, BC cache or PECL extensions.  
>>>> Neither is anything that Horde has to do with.
>>> [...]
>>> Pecl_http is 2.0.6, has been uninstalled and reinstalled, along  
>>> with raphf 1.0.4 and propro 1.0.0.
>>> PHP is 5.3.28 and works fine for everything else... and has done  
>>> every time I've been told before that 'your php is broken' and  
>>> it's proven to be bugs in other packages... :-/
>
> I've done the reinstall steps as well, without any success.
>
>>> Cache is xcache, and also works fine for everything else.
>
> No cache that I know of is (yet) running here.
>
> Regards,
> Jens
>

At least it's not just me lol...

Jens, you look to have a far sounder understanding of this than me :)  
Are you going to take this up with the package maintainers?

Simon


--
Simon Wilson
M: 0400 12 11 16
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 1339 bytes
Desc: PGP Public Key
URL: <http://lists.horde.org/archives/horde/attachments/20140527/59ab4a56/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: PGP Digital Signature
URL: <http://lists.horde.org/archives/horde/attachments/20140527/59ab4a56/attachment-0001.bin>


More information about the horde mailing list