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
php71 mongoDB ext crashing php #681
Comments
Extension has been removed right now. If I install php71-mongodb my PHP will crash again. If you need anything else please let me know. |
We'd need a strack trace made with GDB, as is explained at https://bugs.php.net/bugs-generating-backtrace.php |
@derickr I am not sure how to generate it in macOS |
Exactly the same as on Linux :-) You might have to install GDB though. |
@derickr I hope this is it:
|
I've made issue #682 and andreas suggest that my issue is same with this one. |
@aleksandardragojlovic, @deboraglory, unfortunately this GDB trace is not useful, as it doesn't give any lines of code etc. This is because apparently your "httpd" has no debugging symbols. It would be really useful if you could try this on the command line as well, with "gdb --args php", and see whether it happens there as well. If I may act on a hunch, I think what is happening is that there are two different openssl libraries being used here. One in "httpd" and one for the PHP driver. In order to test this theory, can you also run:
|
@derickr gdb --args php has the same result
httpd check
BTW, when i start MAMP the one httpd run is from /Applications/MAMP/Library/bin/httpd.
|
@aleksandardragojlovic: Can you follow up with Based on discussion in #682, I think we've concluded that @deboraglory's issue is due to conflicting versions of OpenSSL. Her web server runtime is using OSX's system library (boringssl), but the version of PHP and Please see my response in #682 (comment) and let me know if that can be applied in your situation. |
Hello,
|
@jmikola I have pasted an output from my Terminal. Thank you. |
@aleksandardragojlovic: You may want to edit your last comment. |
|
@jmikola I made a mistake. I have added new comment. |
Based on your To reiterate here, the root cause of this is In the driver itself, we're aiming to utilize Secure Transport instead of OpenSSL on macOS with PHPC-888 for 1.4.0, which would circumvent this issue. That said, the conflict between BoringSSL and OpenSSL is still an open issue (if not for our extension after 1.4.0, then certainly for any other PHP application using OpenSSL -- such as the OpenSSL API itself). |
What is the solution for this issue now? Lot of our development environment are unusable due to this issue! @jmikola |
@sibidharan: I believe the best workaround at present is to switch from I expect PHPC-888 is the best long term solution to this issue (at least for the MongoDB driver). |
@jmikola I also observed that if I compile Let's see what the future holds! |
Switching to php fpm works for me. Thank you very much. |
@sibidharan: We've no plans to start providing object files, although you're certainly free to do so on your own. PECL provides its own DLLs for Windows users, but that's a special case given the complexity of Windows' build environment. But considering this crash is not unique to Homebrew (at least one user experienced it from a basic PECL install, which didn't involve Homebrew's OpenSSL), I'm doubtful that a pre-compiled |
@jmikola That is true. Then for now, let's stick with FPM until 1.4.0 driver for mongodb is out! |
@aleksandardragojlovic httpd is not crashing anymore. I said what I did in in Homebrew/homebrew-core#21475 (comment), which solved my issue 💯 libmongoc SSL library is Secure Transport now :D |
Per my response in https://github.com/Homebrew/homebrew-php/issues/4607#issuecomment-359929194, this should be addressed by the recently tagged 1.4.0RC1 release. If you build from source, as the Homebrew formula does, you can provide |
This should address outstanding segfaults on macOS High Sierra due to BoringSSL: https://github.com/Homebrew/homebrew-php/issues/4607 mongodb/mongo-php-driver#681 mongodb/mongo-php-driver#682
@abinhho the information is heavily outdated. For one, with Furthermore, the instructions to install PHP are also outdated and will no longer work - the |
Description
I have created an issue: https://github.com/Homebrew/homebrew-php/issues/4607 . Andreas told me to create new issue here, since it doesn't seem to be a problem specific to homebrew.
After I install php71-mongodb my php stop working.
I have installed on clean system (High Sierra) php71 with necessary extensions. When I install mongoDB my php stop working. In system.log I see segmentation errors. When I uninstall mongoDB php ext. everything is working correctly.
Environment
macOS High Sierra 10.13.1 (17B1002)
PHP installed via homebrew. In formula, I believe it uses pecl to install mongodb.
PHP 7.1.11 (cli) (built: Nov 28 2017 11:35:47) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
php -i
The text was updated successfully, but these errors were encountered: