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

memcached extension enabled twice on PHP 7.4 and 7.3 #428

Closed
3 of 5 tasks
lukasbestle opened this issue Mar 6, 2021 · 1 comment
Closed
3 of 5 tasks

memcached extension enabled twice on PHP 7.4 and 7.3 #428

lukasbestle opened this issue Mar 6, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lukasbestle
Copy link

Describe the bug

On PHP 7.3 and 7.4, the Setup PHP action tries to install and enable the memcached extension and produces the following output:

/bin/bash /opt/hostedtoolcache/linux.sh 7.4 /home/runner/work/_actions/shivammathur/setup-php/v2/dist

==> Setup PHP
✓ PHP Switched to PHP 7.4.15

==> Setup Tools
✓ composer Added composer 2.0.11
✓ phpunit Added phpunit 9.5.2

==> Setup Extensions
✓ mbstring Enabled
✓ ctype Enabled
✓ curl Enabled
✓ gd Enabled
✓ apcu Enabled
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20190902/memcached.so' (tried: /usr/lib/php/20190902/memcached.so (/usr/lib/php/20190902/memcached.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902//usr/lib/php/20190902/memcached.so.so (/usr/lib/php/20190902//usr/lib/php/20190902/memcached.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  Module 'memcached' already loaded in Unknown on line 0
✓ memcached Installed and enabled
PHP Warning:  Module 'memcached' already loaded in Unknown on line 0
PHP Warning:  Module 'memcached' already loaded in Unknown on line 0
✓ pcov Enabled

==> Setup Coverage
✓ pcov.enabled=1 Added to php.ini
✓ coverage: pcov PCOV enabled as coverage driver

==> Add php.ini values
✓ apc.enabled=1 Added to php.ini
✓ apc.enable_cli=1 Added to php.ini
✓ pcov.directory=. Added to php.ini
✓ pcov.exclude='"~(vendor|tests)~"' Added to php.ini

==> Support this project
✓ setup-php https://setup-php.com/support

This results in the following error during the actual test run:

PHP Warning:  Module 'memcached' already loaded in Unknown on line 0

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems

ubuntu-latest (currently still 18.04.5 LTS for us)

PHP versions

7.3, 7.4, 8.0

To Reproduce

jobs:
  backend-tests:
    name: PHP ${{ matrix.php }}

    runs-on: ubuntu-latest
    strategy:
      matrix:
        php: [ "7.3", "7.4", "8.0" ]
    env:
      extensions: mbstring, ctype, curl, gd, apcu, memcached, pcov
      ini: apc.enabled=1, apc.enable_cli=1, pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""

    steps:
      - name: Setup PHP cache environment
        id: ext-cache
        uses: shivammathur/cache-extensions@v1
        with:
          php-version: ${{ matrix.php }}
          extensions: ${{ env.extensions }}
          key: php-v1

      - name: Cache PHP extensions
        uses: actions/cache@v2
        with:
          path: ${{ steps.ext-cache.outputs.dir }}
          key: ${{ steps.ext-cache.outputs.key }}
          restore-keys: ${{ steps.ext-cache.outputs.key }}

      - name: Setup PHP environment
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: ${{ env.extensions }}
          ini-values: ${{ env.ini }}
          coverage: pcov
          tools: phpunit:^9

Expected behavior

The memcached extension should only be enabled once.

Screenshots/Logs

You can find the full workflow output here: https://github.com/getkirby/kirby/runs/2045990826

Additional context

The same configuration works fine on PHP 8.0.

Are you willing to submit a PR?

I'm not sure where this issue is coming from TBH.

@lukasbestle lukasbestle added the bug Something isn't working label Mar 6, 2021
@shivammathur
Copy link
Owner

Fixed in 890ea4b and shivammathur/cache-extensions@ac51409

Test workflows:
Without cache: https://github.com/shivammathur/test-setup-php/runs/2048117303
With cache: https://github.com/shivammathur/test-setup-php/actions/runs/628232400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants