Hi Owen,

Do you have clear steps to reproduce the issue?

php8.1-zip does depend on libzip4 and that should be installed once you
install php-zip.

trying to reproduce the issue, I did the following steps:

$ lxc launch ubuntu-daily:jammy php-j
$ lxc exec php-j bash
# apt update
# apt install -y php8.1
# php -m | grep zip

No zip module available here.

# apt install -y php-zip
# php -m | grep zip
zip

Now the module is available.

Then I ran the first example in

https://www.php.net/manual/en/zip.examples.php

(Example #1 Create a Zip archive)

# php test.php 
PHP Warning:  Undefined variable $thisdir in /root/test.php on line 12
PHP Warning:  ZipArchive::addFile(): No such file or directory in 
/root/test.php on line 12
numfiles: 2
status:0

# apt install -y unzip
# unzip -l test112.zip
Archive:  test112.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
       51  2022-05-09 18:52   testfilephp.txt1652122377
       52  2022-05-09 18:52   testfilephp2.txt1652122377
---------                     -------
      103                     2 files

Do you happen to have multiple versions of php installed locally?

What do you get for
$ namei $(which php)
?

Since there is not enough information in your report to begin triage or to
differentiate between a local configuration problem and a bug in Ubuntu, I
am marking this bug as "Incomplete". We would be grateful if you would:
provide a more complete description of the problem, explain why you
believe this is a bug in Ubuntu rather than a problem specific to your
system, and then change the bug status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

** Changed in: php-defaults (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1971688

Title:
  PHP 8.1 zip module asserting with dependency problem

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php-defaults/+bug/1971688/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to