Skip to content
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

Install MongoDB extension by default #7

Open
alcaeus opened this issue Oct 18, 2022 · 5 comments
Open

Install MongoDB extension by default #7

alcaeus opened this issue Oct 18, 2022 · 5 comments

Comments

@alcaeus
Copy link

alcaeus commented Oct 18, 2022

Hello! Before I blindly create a pull request, I thought I'd ask in the issue tracker first.

Would there be any interest to package the MongoDB extension so it's installed by default? At MongoDB we've received numerous support requests from people using tools like XAMPP and WAMPserver about not being able to get the extension running. Usually, these errors can be traced back to users not enabling the extension in the correct .ini files (typically only enabling it for the CLI so it shows up when running php -m but not when running phpinfo() in their web server). These issues could be avoided and the user experience improved by bundling the MongoDB extension.

If this is not the right repository/channel for such an issue, please tell me where to open this discussion instead. Thanks!

@beltran-rubo
Copy link
Member

Hi @alcaeus, it sounds great, I think it would be a great addition to XAMPP. The installer already includes optional PHP extensions (disabled by default) so users can easily enable them if needed.

@alcaeus
Copy link
Author

alcaeus commented Oct 20, 2022

Hi Beltran,

great to hear!

Can you give me a few insights into how extensions are packaged in XAMPP? From reading the code, I understand this as follows:

  • For Linux/MacOS, I can see that PECL extensions have phpize called (source code), and I can see that the imagick extension also calls configure (source code). Is it safe to assume that make is invoked automatically as part of the build process?
  • I can see that the imagick extension has a version hard-coded (source code). This would mean that the file needs updating every time we release an update to our extension. Do I understand that correctly or am I missing something?
  • For Windows, PECL extensions are copied over from a directory (source code), but I can't see where they originate. Do you build those yourselves, or do you require build artifacts (i.e. finished DLLs) for each combination of PHP version, fitness, and thread safety?

@beltran-rubo
Copy link
Member

Great research:

  • Correct, the method build executes the make part inherited from the main method
  • All the thirdparty source code is currently available here to download. Not needed to upload it, I can do on my side.
  • For Windows, it would be easier, just uncompress the file and copy the proper dll, see this example. Take into account if the dll is compatible with specific versions of PHP.
    I hope it helps.

@alcaeus
Copy link
Author

alcaeus commented Feb 2, 2023

@beltran-rubo circling back to this now. We're building DLLs for Windows automatically as part of our release process, and they are attached to the GitHub release. Would those files have to be uploaded to sourceforge or is it possible to grab them directly from GitHub?

@beltran-rubo
Copy link
Member

We can pick them from the official MongoDB release at GitHub and include it into the XAMPP installer. We usually also upload to sourceforge to have all the thirdparty sources together for simplicity, we can take care of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants