Repository navigation
Closed
Labels
Description
Describe the bug
Run shivammathur/setup-php@v2
/usr/bin/bash /home/runner/actions-runner/_work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh
==> Setup PHP
β PHP Installed PHP 8.4.6
==> Setup Extensions
PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring.so' (tried: /usr/lib/php/20240924/mbstring.so (/usr/lib/php/20240924/mbstring.so: undefined symbol: zend_get_property_info_for_slot_slow), /usr/lib/php/20240924/mbstring.so.so (/usr/lib/php/20240924/mbstring.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
β grpc Installed and enabled
PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring.so' (tried: /usr/lib/php/20240924/mbstring.so (/usr/lib/php/20240924/mbstring.so: undefined symbol: zend_get_property_info_for_slot_slow), /usr/lib/php/20240924/mbstring.so.so (/usr/lib/php/20240924/mbstring.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 'mbstring.so' (tried: /usr/lib/php/20240924/mbstring.so (/usr/lib/php/20240924/mbstring.so: undefined symbol: zend_get_property_info_for_slot_slow), /usr/lib/php/20240924/mbstring.so.so (/usr/lib/php/20240924/mbstring.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 'mbstring.so' (tried: /usr/lib/php/20240924/mbstring.so (/usr/lib/php/20240924/mbstring.so: undefined symbol: zend_get_property_info_for_slot_slow), /usr/lib/php/20240924/mbstring.so.so (/usr/lib/php/20240924/mbstring.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
β protobuf Installed and enabled
β sodium Enabled
PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring.so' (tried: /usr/lib/php/20240924/mbstring.so (/usr/lib/php/20240924/mbstring.so: undefined symbol: zend_get_property_info_for_slot_slow), /usr/lib/php/20240924/mbstring.so.so (/usr/lib/php/20240924/mbstring.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
β :psr Could not find psr on PHP 8.4.6
==> Setup Tools
PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring.so' (tried: /usr/lib/php/20240924/mbstring.so (/usr/lib/php/20240924/mbstring.so: undefined symbol: zend_get_property_info_for_slot_slow), /usr/lib/php/20240924/mbstring.so.so (/usr/lib/php/20240924/mbstring.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
β composer Added composer 2.8.6
==> Setup Coverage
β none Disabled Xdebug and PCOV
Then when running composer, we see the wrong version of PHP used:
PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring.so' (tried: /usr/lib/php/20240924/mbstring.so (/usr/lib/php/20240924/mbstring.so: undefined symbol: zend_get_property_info_for_slot_slow), /usr/lib/php/20240924/mbstring.so.so (/usr/lib/php/20240924/mbstring.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- Root composer.json requires php ~8.4.5 but your php version (8.4.4) does not satisfy that requirement.
Expecting 8.4.6, but 8.4.4 was used.
Version
- v2
- v1
Runners
Self Hosted
Operating systems
Ubuntu 22.04
PHP versions
8.4
To Reproduce
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: grpc, protobuf, sodium, :php-psr
tools: composer:v2
coverage: none
env:
update: true
Expected behavior
For the mbstring extension to be loaded, and PHP 8.4.6 linked.
Screenshots/Logs
No response
Additional context
No response
Are you willing to submit a PR?
Yes
Activity
shivammathur commentedon May 7, 2025
@GrahamCampbell
Please try with specifying the runner env as self-hosted in the setup-php step.
https://github.com/shivammathur/setup-php?tab=readme-ov-file#self-hosted-setup
shivammathur commentedon May 14, 2025
@GrahamCampbell was that helpful?
GrahamCampbell commentedon May 14, 2025
Thanks for the reply. It's too early to say, as this was a flaky issue. We're letting this bed in for a week or so, to see if it re-occurs with this change applied.
GrahamCampbell commentedon May 16, 2025
It looks like this issue is still reoccurring from time to time.
shivammathur commentedon May 16, 2025
@GrahamCampbell
Please try recreating this with
shivammathur/setup-php@more-verboseinstead ofv2and provide me the logs.GrahamCampbell commentedon May 28, 2025
We were able to reproduce a similar bug, on another self-hosted runner with a different image: https://gist.github.com/GrahamCampbell/b469e915e48db44fa1e7133e0eadae29.
GrahamCampbell commentedon May 28, 2025
For comparison, here's a slow, but working run: https://gist.github.com/GrahamCampbell/2993f114430f2a8be496c9058ff04bdc.
shivammathur commentedon May 29, 2025
@GrahamCampbell
I'm not sure why sqlsrv extensions would be added in this workflow. The only reason this can occur is if it was run without the env
runner: self-hostedon that machine.If you need the sqlsrv extensions, I would suggest running the following and adding the extensions to the workflow.
If not, I would suggest disabling them by removing the php.ini entry for them, you can do that manually or by running a workflow with the step below once, and then you can revert it.
shivammathur commentedon Jun 10, 2025
There should be better support for checking self-hosted runners in 2.34.0 that should prevent such cases. If this happens again, please reopen the issue.