php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79869 Unsupported operand types: array & int in install-pear-nozlib.phar
Submitted: 2020-07-17 20:58 UTC Modified: 2021-08-22 04:22 UTC
Votes:12
Avg. Score:4.2 ± 0.9
Reproduced:9 of 10 (90.0%)
Same Version:6 (66.7%)
Same OS:3 (33.3%)
From: ueli at whatwedo dot ch Assigned: ashnazg (profile)
Status: No Feedback Package: *Compile Issues
PHP Version: 8.0.0alpha2 OS: Alpine Linux 3.12
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ueli at whatwedo dot ch
New email:
PHP Version: OS:

 

 [2020-07-17 20:58 UTC] ueli at whatwedo dot ch
Description:
------------
After compiling PHP 8 and running install-pear-nozlib.phar I get "Unsupported operand types: array & int"



Test script:
---------------
clone:

https://github.com/whatwedo/php-alpine/tree/feature/php-8

run:

ALPINE_VERSION=3.12 PHP_VERSION=8.0 docker-compose run sandbox ./build.sh --full



Actual result:
--------------
Fatal error: Uncaught TypeError: Unsupported operand types: array & int in /tmp/src-php8/php-8.0.0alpha2/pear/install-pear-nozlib.phar:517
Stack trace:
#0 /tmp/src-php8/php-8.0.0alpha2/pear/install-pear-nozlib.phar(454): PHP_Archive::_unserializeManifest('F\x00\x00\x00\x11\x00\x00\x00\x01\x00\x18\x00\x00\x00i...')
#1 /tmp/src-php8/php-8.0.0alpha2/pear/install-pear-nozlib.phar(414): PHP_Archive::_mapPhar('/tmp/src-php8/p...', 43987)
#2 /tmp/src-php8/php-8.0.0alpha2/pear/install-pear-nozlib.phar(1164): PHP_Archive::mapPhar(NULL, 43987)
#3 {main}
  thrown in /tmp/src-php8/php-8.0.0alpha2/pear/install-pear-nozlib.phar on line 517
make[1]: *** [Makefile:570: install-pear-installer] Error 255
make: *** [Makefile:575: install-pear] Error 2

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-07-24 13:06 UTC] fpoirotte+php-bug79869 at gmail dot com
Hello,

See my tentative fix at https://github.com/pear/PHP_Archive/pull/4.
Not sure if this is the only issue affecting PHP 8.0.0 compatibility or not.

I just hope the package's maintainers can release a fixed PHAR archive soon because I also would like to use PHP 8 and pear together.

Regards,
Fran├žois
 [2021-03-16 14:44 UTC] fred5 at hardings dot co dot za
Fatal error: Uncaught TypeError: Unsupported operand types: array & int in /install_dir/php-8.0.3/pear/install-pear-nozlib.phar:517
Stack trace:
#0 /install_dir/php-8.0.3/pear/install-pear-nozlib.phar(454): PHP_Archive::_unserializeManifest('F\x00\x00\x00\x11\x00\x00\x00\x01\x00\x18\x00\x00\x00i...')
#1 /install_dir/php-8.0.3/pear/install-pear-nozlib.phar(414): PHP_Archive::_mapPhar('/OriginSystemsD...', 43987)
#2 /install_dir/php-8.0.3/pear/install-pear-nozlib.phar(1164): PHP_Archive::mapPhar(NULL, 43987)
#3 {main}
  thrown in /install_dir/php-8.0.3/pear/install-pear-nozlib.phar on line 517
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2
 [2021-03-16 15:07 UTC] fred5 at hardings dot co dot za
https://www.php.net/manual/en/oci8.installation.php

pecl install oci8

Requires pear....

but PHP 8 compilation using  --with-pear=shared

Results in this failure:

Fatal error: Uncaught TypeError: Unsupported operand types: array & int in /install_dir/php-8.0.3/pear/install-pear-nozlib.phar:517
Stack trace:
#0 /install_dir/php-8.0.3/pear/install-pear-nozlib.phar(454): PHP_Archive::_unserializeManifest('F\x00\x00\x00\x11\x00\x00\x00\x01\x00\x18\x00\x00\x00i...')
#1 /install_dir/php-8.0.3/pear/install-pear-nozlib.phar(414): PHP_Archive::_mapPhar('/OriginSystemsD...', 43987)
#2 /install_dir/php-8.0.3/pear/install-pear-nozlib.phar(1164): PHP_Archive::mapPhar(NULL, 43987)
#3 {main}
  thrown in /install_dir/php-8.0.3/pear/install-pear-nozlib.phar on line 517
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2


Trying to install install PHP 8, then subsequently pear (for linux) via

https://pear.php.net/manual/en/installation.getting.php

Results in: 

php go-pear.phar

Warning: Private methods cannot be final as they are never overridden by other classes in /root/go-pear.phar on line 339

Fatal error: Uncaught TypeError: Unsupported operand types: array & int in /root/go-pear.phar:517
Stack trace:
#0 /root/go-pear.phar(454): PHP_Archive::_unserializeManifest('F\x00\x00\x00\x11\x00\x00\x00\x01\x00\f\x00\x00\x00g...')
#1 /root/go-pear.phar(414): PHP_Archive::_mapPhar('/root/go-pear.p...', 43879)
#2 /root/go-pear.phar(1164): PHP_Archive::mapPhar(NULL, 43879)
#3 {main}
  thrown in /root/go-pear.phar on line 517

This Unsupported operand types: array & int problem is preventing our upgrade to PHP 8.

And it has been in existence at least 17th July 2020.

I simply cannot believe it has existed for so long without being sorted out.
 [2021-04-13 12:03 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-04-13 12:03 UTC] cmb@php.net
This has apparently been fixed a while ago.
 [2021-07-08 09:05 UTC] liam dot gretton at gmail dot com
This problem still exists in PHP 8.0.8:

Installing man pages:             /opt/php8/share/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      %{phpconfdir}/pear/php/

Fatal error: Uncaught TypeError: Unsupported operand types: array & int in /home/liam/downloads/php8/php-8.0.8/pear/install-pear-nozlib.phar:517
Stack trace:
#0 /home/liam/downloads/php8/php-8.0.8/pear/install-pear-nozlib.phar(454): PHP_Archive::_unserializeManifest('F\x00\x00\x00\x11\x00\x00\x00\x01\x00\x18\x00\x00\x00i...')
#1 /home/liam/downloads/php8/php-8.0.8/pear/install-pear-nozlib.phar(414): PHP_Archive::_mapPhar('/home/liam/dow...', 43987)
#2 /home/liam/downloads/php8/php-8.0.8/pear/install-pear-nozlib.phar(1164): PHP_Archive::mapPhar(NULL, 43987)
#3 {main}
  thrown in /home/liam/downloads/php8/php-8.0.8/pear/install-pear-nozlib.phar on line 517
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2
 [2021-07-08 10:10 UTC] cmb@php.net
-Status: Closed +Status: Re-Opened -Assigned To: cmb +Assigned To: cweiske
 [2021-07-08 10:10 UTC] cmb@php.net
According to <https://github.com/pear/PHP_Archive/pull/4>, this
issue has been fixed, but maybe there are more such cases.

Anyhow, there appears to be an issue with PEAR.
<https://pear.php.net/install-pear-nozlib.phar> still has
Archive_Tar 1.4.9, although 1.4.13 is latest, so php-src
distributes the old version.

Maybe Christian can help?
 [2021-08-08 14:38 UTC] ashnazg@php.net
-Status: Re-Opened +Status: Feedback -Assigned To: cweiske +Assigned To: ashnazg
 [2021-08-08 14:38 UTC] ashnazg@php.net
I have the pearweb_phars updated on the PEAR website... v1.10.20 now contains the updated Archive_Tar v1.4.14.

See if this solves your issue.
 [2021-08-22 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2021-09-01 22:56 UTC] brian at artinfact dot com
In case it's appropriate to tack on this bug report, I encountered these two warnings but was able to proceed with installation when using PHP 8.0.10 to install pear (using go-pear.phar taken from pearweb_phars-1.10.21).

PHP Warning:  Private methods cannot be final as they are never overridden by other classes in C:\PHP\php-8.0.10-Win32-vs16-x64\go-pear.phar on line 339

Warning: Private methods cannot be final as they are never overridden by other classes in C:\PHP\php-8.0.10-Win32-vs16-x64\go-pear.phar on line 339
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 21 05:03:37 2021 UTC