-
Anybody knows why mongodb works fine in the console but returns 502 error code in the browser on mac? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Usually, it's due to the extension not enabled in php-fpm.
$ cat /opt/homebrew/etc/php/8.2/conf.d/ext-mongodb.ini
extension="mongodb.so" |
Beta Was this translation helpful? Give feedback.
-
This sounds like an issue that was reported a couple of weeks ago: mongodb/mongo-php-library#1145 (comment) TL;DR: php was compiled with OpenSSL, the extension with Secure Transport. The linked issue explains how you can compile the driver with OpenSSL instead to avoid the segmentation faults. The upcoming 1.17 release (currently scheduled for early November) will change the default library to OpenSSL on MacOS and only fall back to Secure Transport if OpenSSL could not be found. |
Beta Was this translation helpful? Give feedback.
-
I am here now. it works with
|
Beta Was this translation helpful? Give feedback.
This sounds like an issue that was reported a couple of weeks ago: mongodb/mongo-php-library#1145 (comment)
TL;DR: php was compiled with OpenSSL, the extension with Secure Transport. The linked issue explains how you can compile the driver with OpenSSL instead to avoid the segmentation faults. The upcoming 1.17 release (currently scheduled for early November) will change the default library to OpenSSL on MacOS and only fall back to Secure Transport if OpenSSL could not be found.