Debian Bug report logs - #822771
php-pear: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on + XML Extension not found

version graph

Package: php-pear; Maintainer for php-pear is Debian PHP Maintainers <team+pkg-php@tracker.debian.org>; Source for php-pear is src:php-pear (PTS, buildd, popcon).

Reported by: Ivan Sergio Borgonovo <ivan.s.b@gmail.com>

Date: Wed, 27 Apr 2016 10:39:02 UTC

Severity: important

Tags: moreinfo, unreproducible

Found in version php-pear/1:1.10.1+submodules+notgz-8

Done: Mathieu Parent <math.parent@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>:
Bug#822771; Package php-pear. (Wed, 27 Apr 2016 10:39:06 GMT) (full text, mbox, link).


Acknowledgement sent to Ivan Sergio Borgonovo <ivan.s.b@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>. (Wed, 27 Apr 2016 10:39:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Ivan Sergio Borgonovo <ivan.s.b@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: php-pear: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on + XML Extension not found
Date: Wed, 27 Apr 2016 12:36:45 +0200
Package: php-pear
Version: 1:1.10.1+submodules+notgz-8
Severity: grave
Justification: renders package unusable

I discovered I've the same problem described here:
http://serverfault.com/questions/589877/pecl-command-produces-long-list-of-errors
examining horde log files

A long list of
Invalid argument supplied for foreach() in /usr/share/pear/PEAR/...
ending with

PHP Warning:  require_once(/lib/Application.php): failed to open stream:
No such file or directory in /usr/bin/horde-alarms on line 21
PHP Fatal error:  require_once(): Failed opening required
'/lib/Application.php' (include_path='.:/usr/share/php:') in
/usr/bin/horde-alarms on line 21

This also seems to be related with some pear issue not setting horde_dir

Simply running
pear list-all
or any other pear command end up in the same list of
Invalid argument supplied for foreach() in /usr/share/pear/PEAR/...
ending with
XML Extension not found

thanks

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.5.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages php-pear depends on:
ii  php-common            1:35
ii  php-xml               1:7.0+35
ii  php5.6-cli [php-cli]  5.6.18+dfsg-11
ii  php7.0-xml [php-xml]  7.0.5-3

php-pear recommends no packages.

php-pear suggests no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>:
Bug#822771; Package php-pear. (Thu, 28 Apr 2016 11:54:03 GMT) (full text, mbox, link).


Acknowledgement sent to Mathieu Parent <math.parent@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>. (Thu, 28 Apr 2016 11:54:03 GMT) (full text, mbox, link).


Message #10 received at 822771@bugs.debian.org (full text, mbox, reply):

From: Mathieu Parent <math.parent@gmail.com>
To: Ivan Sergio Borgonovo <ivan.s.b@gmail.com>, 822771@bugs.debian.org
Subject: Re: [pkg-php-pear] Bug#822771: php-pear: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on + XML Extension not found
Date: Thu, 28 Apr 2016 13:50:01 +0200
Control: severity -1 major
Control: tag -1 + moreinfo unreproducible

2016-04-27 12:36 GMT+02:00 Ivan Sergio Borgonovo <ivan.s.b@gmail.com>:
> Package: php-pear
> Version: 1:1.10.1+submodules+notgz-8
> Severity: grave
> Justification: renders package unusable

Hi,

> I discovered I've the same problem described here:
> http://serverfault.com/questions/589877/pecl-command-produces-long-list-of-errors
> examining horde log files
>
> A long list of
> Invalid argument supplied for foreach() in /usr/share/pear/PEAR/...
> ending with


Can you send the complete log. I need at least the file and line number.

> PHP Warning:  require_once(/lib/Application.php): failed to open stream:
> No such file or directory in /usr/bin/horde-alarms on line 21
> PHP Fatal error:  require_once(): Failed opening required
> '/lib/Application.php' (include_path='.:/usr/share/php:') in
> /usr/bin/horde-alarms on line 21

How have you installed Horde? Using PEAR or apt?

What does aptitude search "php~i" outputs?

> This also seems to be related with some pear issue not setting horde_dir

What does pear config-get horde_dir outputs?

> Simply running
> pear list-all
> or any other pear command end up in the same list of
> Invalid argument supplied for foreach() in /usr/share/pear/PEAR/...
> ending with
> XML Extension not found

I can't reproduce.

> thanks
>
> -- System Information:
> Debian Release: stretch/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')

You have a mix of php5 and php7. Ensure you have the corresponding
versions (for xml, ...)


> Versions of packages php-pear depends on:
> ii  php-common            1:35
> ii  php-xml               1:7.0+35
> ii  php5.6-cli [php-cli]  5.6.18+dfsg-11
> ii  php7.0-xml [php-xml]  7.0.5-3

Regards


-- 
Mathieu Parent



Added tag(s) unreproducible and moreinfo. Request was from Mathieu Parent <math.parent@gmail.com> to 822771-submit@bugs.debian.org. (Thu, 28 Apr 2016 11:54:03 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>:
Bug#822771; Package php-pear. (Tue, 03 May 2016 14:27:08 GMT) (full text, mbox, link).


Acknowledgement sent to Mathieu Parent <math.parent@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>. (Tue, 03 May 2016 14:27:08 GMT) (full text, mbox, link).


Message #17 received at 822771@bugs.debian.org (full text, mbox, reply):

From: Mathieu Parent <math.parent@gmail.com>
To: 822771@bugs.debian.org
Subject: Re: php-pear: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on + XML Extension not found
Date: Tue, 3 May 2016 16:22:48 +0200
Control: severity -1 important

Downgrading severity as I can't reproduce.

Regards



Severity set to 'important' from 'grave' Request was from Mathieu Parent <math.parent@gmail.com> to 822771-submit@bugs.debian.org. (Tue, 03 May 2016 14:27:08 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>:
Bug#822771; Package php-pear. (Tue, 10 May 2016 10:51:19 GMT) (full text, mbox, link).


Acknowledgement sent to Ivan Sergio Borgonovo <ivan.s.b@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>. (Tue, 10 May 2016 10:51:19 GMT) (full text, mbox, link).


Message #24 received at 822771@bugs.debian.org (full text, mbox, reply):

From: Ivan Sergio Borgonovo <ivan.s.b@gmail.com>
To: 822771@bugs.debian.org
Subject: xml actually missing from php5
Date: Tue, 10 May 2016 12:47:17 +0200
Possibly I got a clue.

There is just a php-xml and no php5-xml or php7-xml packages.

Looking in /etc/php/5.6/mods-available there is no xml.ini while there 
is a xml.ini in /etc/php/7.0/mods-available

After installing php7.0-cli

ivan@caronte:~$ php5.6 xml.php
PHP Fatal error:  Call to undefined function xml_parser_create() in 
/home/ivan/xml.php on line 3

while

ivan@caronte:~$ php7.0 xml.php
doesn't report any error.

I was not able to uninstall php7 due to dependencies.

These and only these packages where automatically installed even if I 
didn't explicitly asked to install php7:
php7.0-common
php7.0-gd
php7.0-json
php7.0-mbstring
php7.0-xml

Trying to purge php7.0-xml says it depends on php-xml but horde depends 
on it.

I'm not completely convinced it is a php/xml problem only.
I'll try to understand what a proper installation of xml should be for 
php5 and see if I can fix it it manually if it's just a matter of 
configuration files but evidently at least there is a problem with php5 
and xml.

BTW I did try to aptitude reinstall php-xml but it didn't help.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>:
Bug#822771; Package php-pear. (Thu, 12 May 2016 04:51:04 GMT) (full text, mbox, link).


Acknowledgement sent to Mathieu Parent <math.parent@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>. (Thu, 12 May 2016 04:51:04 GMT) (full text, mbox, link).


Message #29 received at 822771@bugs.debian.org (full text, mbox, reply):

From: Mathieu Parent <math.parent@gmail.com>
To: 822771@bugs.debian.org
Subject: Re: xml actually missing from php5
Date: Thu, 12 May 2016 06:50:12 +0200
On Tue, 10 May 2016 12:47:17 +0200 Ivan Sergio Borgonovo
<ivan.s.b@gmail.com> wrote:
> Possibly I got a clue.
>
> There is just a php-xml and no php5-xml or php7-xml packages.
>
> Looking in /etc/php/5.6/mods-available there is no xml.ini while there
> is a xml.ini in /etc/php/7.0/mods-available
>
> After installing php7.0-cli
>
> ivan@caronte:~$ php5.6 xml.php
> PHP Fatal error:  Call to undefined function xml_parser_create() in
> /home/ivan/xml.php on line 3

You're probably using php5.6 from deb.sury.org? php5 from Debian
doesn't have this binary.

Do you have any third-party repos?

If this is the case, try to install php5.6-xml.

> while
>
> ivan@caronte:~$ php7.0 xml.php
> doesn't report any error.
>
> I was not able to uninstall php7 due to dependencies.

Yes, php5 is going away from Debian testing.

> These and only these packages where automatically installed even if I
> didn't explicitly asked to install php7:
> php7.0-common
> php7.0-gd
> php7.0-json
> php7.0-mbstring
> php7.0-xml
>
> Trying to purge php7.0-xml says it depends on php-xml but horde depends
> on it.
>
> I'm not completely convinced it is a php/xml problem only.
> I'll try to understand what a proper installation of xml should be for
> php5 and see if I can fix it it manually if it's just a matter of
> configuration files but evidently at least there is a problem with php5
> and xml.

php5 is no more supported in stretch. Why do you need it?

> BTW I did try to aptitude reinstall php-xml but it didn't help.

Regards

Mathieu Parent



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>:
Bug#822771; Package php-pear. (Sun, 15 May 2016 15:39:05 GMT) (full text, mbox, link).


Acknowledgement sent to Ivan Sergio Borgonovo <ivan.s.b@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>. (Sun, 15 May 2016 15:39:05 GMT) (full text, mbox, link).


Message #34 received at 822771@bugs.debian.org (full text, mbox, reply):

From: Ivan Sergio Borgonovo <ivan.s.b@gmail.com>
To: 822771@bugs.debian.org
Subject: somehow SOLVED: php5/7 mix
Date: Sun, 15 May 2016 17:31:09 +0200
I sorted it out.
I created a sid lxc container, installed just php-pear and noticed no 
php5 package was installed and pear was working with no error.

I installed horde in the container.
I took note of the php packages that were installed and installed them 
on the machine that was having problems with pear.

No more pear errors but I've found a couple of related problems to the 
transition.

horde was not working for an incompatibility issue in php-text-wiki.
/usr/share/php/Text/Wiki.php suffer from
New objects cannot be assigned by reference
http://php.net/manual/en/migration70.incompatible.php

and I had to change all instances of
=& new
to
= new

Then I got to fix

PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib/php/20151012/http.so' - /usr/lib/php/20151012/http.so: 
undefined symbol: php_resource_factory_handle_ctor in Unknown on line 0

Installing
php-propro
and
php-raphf

fixed the problem

Finally I removed all php5 packages and everything was still working.


There are some actual problem in the php5 -> php7 transition and while a 
fresh install of php7 works, coming from php5 may not.
Once I got horde working on that box I didn't install any other php 
package but upgrades took in php7 even when it was not installed and 
this most probably caused the problem.

Unless you help me to track down the "transitioning" issue I can't help 
any further on this. At least I solved *my* problem and I documented how.

I hope it helps to find the issue.

I'll issue other 2 separate bug reports for php-common 
(/usr/lib/php/sessionclean) and php-text-wiki 
(/usr/share/php/Text/Wiki.php) shortly.

thanks

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it




Reply sent to Mathieu Parent <math.parent@gmail.com>:
You have taken responsibility. (Thu, 01 Aug 2019 20:06:12 GMT) (full text, mbox, link).


Notification sent to Ivan Sergio Borgonovo <ivan.s.b@gmail.com>:
Bug acknowledged by developer. (Thu, 01 Aug 2019 20:06:12 GMT) (full text, mbox, link).


Message #39 received at 822771-done@bugs.debian.org (full text, mbox, reply):

From: Mathieu Parent <math.parent@gmail.com>
To: 822771-done@bugs.debian.org
Subject: Closing
Date: Thu, 1 Aug 2019 22:04:07 +0200
CLosing, as this was probably a setup problem.

Regards
-- 
Mathieu



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 30 Aug 2019 07:34:34 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 01:54:04 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.