mysqli not found in (php-fpm) docker container
Your problem isn't that you're missing the mysqli extension.
If you're doing something like this:
namespace Listener;class Foo{ public function bar() { $conn = new mysqli(...); }}
Then PHP will interpret new mysqli()
as new \Listener\mysqli()
because you're currently in the \Listener
namespace. To fix this, you can just explicitly anchor mysqli()
to the root namespace:
$conn = new \mysqli(...);