Skip to content

Issue with pecl not falling back to IPv4 when IPv6 is preferred #1674

Description

@cfahner

Recently I tried setting up the latest 8.5-fpm container. From the instructions on this page you suggest the install-php-extensions script. Building the container worked great locally, but when building it on the server it seemed to get stuck when trying to reach pecl.php.net during the install-php-extensions script (used v2.11.12). All other commands worked fine (installing packages, pulling from github, etc). The final error message always looked something like:

No releases available for package "pecl.php.net/extension-name"
install failed

Turns out the server had IPv6 connectivity issues and the server was set to prefer IPv6 over IPv4. All other commands on the server fell back to IPv4 except pecl, which just seems to give up. To work around the issue I modified /etc/gai.conf to temporarily prefer IPv4 over IPv6 before running install-php-extensions.

Since pecl is deprecated I don't really expect a fix, but since the script using pecl is recommended from the php image page it might be useful to document this issue somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions