PHP MongoDB extension/class issues only with CLI
You are most likely using the wrong php file then. Use php --ini
to see which ones it loads. You can also set the php.ini
settings display_errors=1
and display_startup_errors=1
to see what a reason for it not being loaded could be.