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

PHP Startup: Unable to load dynamic library 'newrelic.so' #447

Open
repelmoine opened this issue May 22, 2023 · 0 comments
Open

PHP Startup: Unable to load dynamic library 'newrelic.so' #447

repelmoine opened this issue May 22, 2023 · 0 comments

Comments

@repelmoine
Copy link

Hi
I tried to update and use bref v2 and bref extra v1. In cloudwatch i have the following error log:

Error log:
PHP Warning: PHP Startup: Unable to load dynamic library 'newrelic.so' (tried: /opt/bref/lib/php/extensions/no-debug-non-zts-20210902/newrelic.so (/opt/bref/lib/php/extensions/no-debug-non-zts-20210902/newrelic.so: cannot open shared object file: No such file or directory), /opt/bref/lib/php/extensions/no-debug-non-zts-20210902/newrelic.so.so (/opt/bref/lib/php/extensions/no-debug-non-zts-20210902/newrelic.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Newrelic daemon is unabled to start and newrelic metrics aren't sent.

To fix the error, I tried to overwrite the ext-newrelic.ini with the following content:
extension=/opt/bref/extensions/newrelic.so
Now in cloudwatch i still have the a first error log PHP Startup: Unable to load dynamic library 'newrelic.so'... but the second log indicates that the daemon normally started and finally metrics are correctly sent.

I found the following things:

  • One of the differences bewteen bref-extra v0.* and bref-extra v1.* is the path of extensions

  • My layer php-81 is built from the layer function + docker-bake and we can see the bref.ini containing this line is copied into the layer.

  • My newrelic layer is built from the target build-environment which doesn't contained the bref.ini with the right path of extensions.

There must be a "conflict" between the two layers. Or maybe i've just mis-configured something ?

Could you please investigate this ?

Thanks in advance

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

1 participant