shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

Home Page:https://setup-php.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warnings when using PHP 8.3 on self-hosted runners

Sn0wCrack opened this issue · comments

Describe the bug

Currently some of my self-hosted runners that have PHP 8.3 installed seem to output several warnigns about installed extensions failing to load in due to additionally missing linked libraries.

Some runners also seem to have slightly different PHP versions installed, with some having 8.3.0 and others having 8.3.6.

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 22.04.4 LTS

PHP versions

PHP 8.3

To Reproduce

Using PHP 8.3 on a self-hosted runner, unsure how this triggered in the first place for these runners.

Expected behavior

All required packages would be installed for these extensions

Screenshots/Logs

Output from running a PHP process on a server producing the error:

PHP Warning:  PHP Startup: Unable to load dynamic library 'amqp.so' (tried: /usr/lib/php/20230831/amqp.so (librabbitmq.so.4: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/amqp.so.so (/usr/lib/php/20230831/amqp.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'dba.so' (tried: /usr/lib/php/20230831/dba.so (liblmdb.so.0: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/dba.so.so (/usr/lib/php/20230831/dba.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'enchant.so' (tried: /usr/lib/php/20230831/enchant.so (libenchant-2.so.2: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/enchant.so.so (/usr/lib/php/20230831/enchant.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20230831/imagick.so (libMagickWand-6.Q16.so.6: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/imagick.so.so (/usr/lib/php/20230831/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'imap.so' (tried: /usr/lib/php/20230831/imap.so (libc-client.so.2007e: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/imap.so.so (/usr/lib/php/20230831/imap.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_dblib.so' (tried: /usr/lib/php/20230831/pdo_dblib.so (libsybdb.so.5: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/pdo_dblib.so.so (/usr/lib/php/20230831/pdo_dblib.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_firebird.so' (tried: /usr/lib/php/20230831/pdo_firebird.so (libfbclient.so.2: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/pdo_firebird.so.so (/usr/lib/php/20230831/pdo_firebird.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so' (tried: /usr/lib/php/20230831/pdo_sqlsrv.so (libodbcinst.so.2: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/pdo_sqlsrv.so.so (/usr/lib/php/20230831/pdo_sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pspell.so' (tried: /usr/lib/php/20230831/pspell.so (libaspell.so.15: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/pspell.so.so (/usr/lib/php/20230831/pspell.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'snmp.so' (tried: /usr/lib/php/20230831/snmp.so (libnetsnmp.so.40: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/snmp.so.so (/usr/lib/php/20230831/snmp.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'sqlsrv.so' (tried: /usr/lib/php/20230831/sqlsrv.so (libodbcinst.so.2: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/sqlsrv.so.so (/usr/lib/php/20230831/sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'tidy.so' (tried: /usr/lib/php/20230831/tidy.so (libtidy.so.5deb1: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/tidy.so.so (/usr/lib/php/20230831/tidy.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'zmq.so' (tried: /usr/lib/php/20230831/zmq.so (libzmq.so.5: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/zmq.so.so (/usr/lib/php/20230831/zmq.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /usr/lib/php/20230831/memcached.so (libmemcached.so.11: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/memcached.so.so (/usr/lib/php/20230831/memcached.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.3.6 (cli) (built: Apr 11 2024 00:27:27) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies
    with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans

The above output pretty much appears any time any PHP action occurs, from composer install, to starting our test runs.

Additional context

This only seems to affect two of my self-hosted runners for whatever reason and not the others, I'm imagining this is just an issue that occurred when these were installed.

I am also aware for PHP 8.3 it was switched to use a custom build of PHP rather than using ondrej's PHP builds, so that would be why it only affects PHP 8.3 in this case.

All runners would have started using PHP 8.3 around the same time as well, as only a single project began using it and it would have triggered on all of them probably within a week or so of that occurring.

These servers should have the same base set of packages installed as well, as we provisioned them all from a basic Ubuntu 22.04 LTS server image and use a bash script to install all the packages and setup the GitHub Runner service.

Are you willing to submit a PR?

If it's something I can fix then I would happy to take a further look.

@Sn0wCrack

Please provide the workflow you are using.
Also please ensure that you are specifying runner env as self-hosted.
https://github.com/shivammathur/setup-php?tab=readme-ov-file#self-hosted-setup

It looks like I had some workflows that didn't have the self-hosted env, which is probably why this occurred.

I'll make this change and see if this resolves the issue by itself.