wp-local-docker-v2 icon indicating copy to clipboard operation
wp-local-docker-v2 copied to clipboard

Unable to load dynamic library 'newrelic.so' error

Open tcmulder opened this issue 3 years ago • 3 comments

Describe the bug

I get the following error on startup and in my console whenever I run a wp-cli command:

PHP Warning:  PHP Startup: Unable to load dynamic library 'newrelic.so' (tried: /usr/lib/php/20190902/newrelic.so (/usr/lib/php/20190902/newrelic.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/newrelic.so.so (/usr/lib/php/20190902/newrelic.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Steps to Reproduce

A good example of this behavior (although most wp-cli commands do the same, and the error shows up in startup in my 10updocker logs logs for phpfpm):

  1. cd into any running site
  2. in the console, run wp option get home
  3. See error

Expected behavior

I should just see the URL of my site running the above command, but the error above is prepended on a line above it.

Environment information

  • Device: M1 Max MacBook
  • OS: macOS 12.1
  • Docker Desktop version: 4.5.0
  • WordPress version: latest

tcmulder avatar Mar 30 '22 20:03 tcmulder

This is caused by the lack of an arm based .so file for new relic being available. We deal with this during the build but the ini file is never adjusted so that PHP doesn't attempt to load it. Would need to add logic during the build phase or during runtime to prevent PHP from attempting to load the .so file.

dustinrue avatar Mar 30 '22 22:03 dustinrue

That makes sense, been having a few minor issues still with arm and various other tools that haven’t seen updates yet. Is it possible to comment out the extension manually for now, and if so where would we do that? @eduardovillao appeared to be having the same issue in this thread so it’s likely not isolated to just my case.

tcmulder avatar Mar 31 '22 14:03 tcmulder

Same problem here on a MacBook Pro M1. Is there any possible solution? How can we prevent PHP trying to load the newrelic extension?

juanlopez4691 avatar Apr 08 '22 08:04 juanlopez4691