Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you test the PHP v8.0.12 image? #126

Closed
FelicianoTech opened this issue Nov 18, 2021 · 12 comments
Closed

Can you test the PHP v8.0.12 image? #126

FelicianoTech opened this issue Nov 18, 2021 · 12 comments

Comments

@FelicianoTech
Copy link
Contributor

Hey everyone!

Some of you may have noticed that we haven’t published a PHP image for a few new releases now. We’re a bit behind due to an issue we’re having with the prepacked PHP releases we were using. We’re switching the image to use custom-compiled PHP instead.

Can you help test it?

Of the releases we haven’t published yet, we’ve published PHP v8.0.12 as a test image (cimg/php:8.0.12). If you can, please use this image for your build to let us know if it works for you the way a previous cimg/php:* image has or even the legacy PHP image circleci/php:*. Specifically, I want to make sure we’re not missing any PHP extensions that we’ve may have had in a previous image.

@shadowhand
Copy link

The new image is missing --enable-sockets, per https://www.php.net/manual/en/sockets.installation.php. This was previously available.

The previous way of installing PCOV no longer works:

apt install -y php8.0-pcov
<truncated>
E: Unable to locate package php8.0-pcov
E: Couldn't find any package by glob 'php8.0-pcov'
E: Couldn't find any package by regex 'php8.0-pcov'

Exited with code exit status 100

@tmannherz
Copy link

The ext-zip extension is also missing:

8.0.11

λ docker run cimg/php:8.0.11-node php -i | grep "zip"
/etc/php/8.0/cli/conf.d/20-zip.ini
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
gzip compression => enabled
bzip2 compression => disabled (install ext/bz2)
zip
Libzip version => 1.7.3

8.0.13

λ docker run cimg/php:8.0.13-node php -i | grep "zip"
Configure Command =>  './configure'  '--enable-bcmath' '--enable-mbstring' '--enable-phpdbg' '--enable-zip' '--with-curl' '--with-gd' '--with-mysqli' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pgsql' '--with-openssl' '--with-readline' '--with-zlib'
gzip compression => enabled
bzip2 compression => disabled (install ext/bz2)

Notice that Libzip version => 1.7.3 isn't present in the latest tag.

@shadowhand
Copy link

I appreciate that the goal of this change was to provide more timely updates to the cimg/php Docker image. However, I am of the opinion that this is a massive breaking change. The "issue" of a specific release not being immediately available on ppa:ondrej/php is not worth the headache this is causing for users, in that:

  • PHP 8.0.13 is now available on ppa:ondrej/php (there must have been some issue with 8.0.12 that prevented it from being available)
  • a bunch of extensions are suddenly missing, some requiring compilation options
  • previously available method for installing extensions apt install -y php8.0-x is no longer viable
  • there is zero documentation as to how to resolve these issues

As a fellow open source maintainer, I strongly recommend reverting these changes, removing cimg/php:8.0.12, and switching back to an established PHP distribution.

@FelicianoTech
Copy link
Contributor Author

The new image is missing --enable-sockets

I'll get that going in a respin of the images shortly.

The previous way of installing PCOV no longer works:

@shadowhand The method of using apt packages for php extensions won't work in these new images as we don't rely on any of those packages. Unless you have a better idea, I imagine the best method for installation would be with pecl/pear, which isn't in the image at the moment. I can get that in an update today as well.

The ext-zip extension is also missing

Checking

I appreciate that the goal of this change was to provide more timely updates to the cimg/php Docker image. However, I am of the opinion that this is a massive breaking change.

@shadowhand I understand, which is why we're going to fix as much as possible here on what's broken. To answer your question from the other GitHub Issue, we can't use the PPA because 1) sometimes the new versions take longer than we need and 2) they remove older versions that we need. We have images that we need to rebuild/fix that we literally cannot because those versions are no longer available in the PPA. That's not acceptable for our use case in order for us to provide support for these images in the future.

There's some bugs, and docs can be added for the lack of apt packages, yes, and we will do that. We'll do our best to get this to a place that works for CircleCI as well as the users.

@FelicianoTech
Copy link
Contributor Author

Updated images are building. They're be out soon. I'll update here when that happens.

@a-songac
Copy link

Thank you @FelicianoTech for the work you do on this repo and I now understand better the rationale of the change following your previous replies. Just a heads up, the ext-sodium and ext-pcntl extensions are also missing in the new image.

Indeed, a well documented method to add custom extensions now that relying on the PPA is no longer available will be needed.

Thanks again for your work.

@FelicianoTech
Copy link
Contributor Author

Three of the six new image tags have been updated with changes from this thread. The other 3 will be published within 30 minutes. A quick summary:

  • "sockets" has been enabled
  • both "zip" and "libzip" should be available now
  • "sodium" has been enabled
  • "pcntl" has been enabled
  • "gd" is properly installed now (behavior changed around v7.5 apparently)
  • Pear and the pecl command are now available. This is likely going to be the preferred route to install additional extensions. These commands need to be used with sudo.
  • the memory limit has been set back to unlimited a.k.a -1.
  • There's a /etc/php.d/circleci.ini file where you can add additional PHP config options.

I'll check back in next week so we can see if this addresses everything or if there's more tweaks to be made. Then the readme will be updated with suggestions on use, for example, using pecl to install something.

@shadowhand
Copy link

shadowhand commented Nov 20, 2021

@FelicianoTech Thanks for the swift response to the issues raised. I appreciate the reasoning for making this change, even though it has caused some growing pains.

I found a couple of additional issues after testing the new images again...

Running pecl install pcov works, but there are some warnings. At the beginning:

WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update

And at the end:

configuration option "php_ini" is not set to php.ini location
You should add "extension=pcov.so" to php.ini

It appears that pear/pecl need a config set (which has been removed?):

pear config-set php_ini /etc/php.d/circleci.ini

For now I have added this to my config.yml and it seems to be working:

sudo pear config-set php_ini /etc/php.d/circleci.ini && \
sudo pecl update-channels && \
sudo pecl install pcov

@tmannherz
Copy link

I can confirm that zip is now available.

@FelicianoTech
Copy link
Contributor Author

The comments about the pear config have been taken care of. SOAP support was also added. As far as I can tell, anything missing or broken mentioned in this thread were taken care of a few days ago with the final pass adding SOAP. I'll leave this issue open for a bit more to collect any last minute feedback but I think we're good to go here.

@qboot
Copy link

qboot commented Nov 24, 2021

Hello! We are using some PHP extensions with the cimg/php:8.0-node and our circleci build recently failed.

After dig in a bit, we found this issue which is exactly our problem.

We install some extensions with:

sudo apt update && sudo apt install -y php8.0-redis php8.0-apcu php8.0-amqp php8.0-imagick php8.0-intl php8.0-mysql php8.0-uuid

I tried to use pecl instead apt as you have suggested in the comments above:

sudo pecl install redis apcu amqp imagick intl uuid

But now I have some "library not found" errors:

configure: error: librabbitmq not found
configure: error: libuuid not found

For now, we have forced the use of the cimg/php:8.0.11-node. Can you provide a way to be able to install our required additional extensions with the latest images?

Thanks!

@BytesGuy BytesGuy mentioned this issue Dec 2, 2021
@FelicianoTech
Copy link
Contributor Author

@JalexChen We use the Docker originated extension install script now right? So I can close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants