-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Preventing error 500 when function putenv is disabled #52428
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
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
@stof Updated :) |
Guys, will this be merged with branch 6.x as well in future or I should make another PR specially for 6.x? (this PR I targeted to 5.4 but I don't know if this will be at 6.x in future... so I am asking, how to do this correctly. Thank you. |
@ShaiMagal this will be merged up by the core team once this PR is merged (the merge up happens usually once a week for dev version, and it will happen for sure before tagging a release) |
Should we do the same in |
I had a look and I don't think we need to: AbstractBrowser + the spot in Runtime are for command line usages, and to me those are not affected by (cheap) hosters. |
Thank you @ShaiMagal. |
Description:
Some webhostings are blocking function "putenv". So, it will show error 500 Error (UndefinedFunction) with text:
Attempted to call function "putenv" from namespace "Symfony\Component\HttpKernel
This PR is checking callability of putenv first, so preventing error 500.
How to test?
-> php.ini - disabled_functions=putenv
-> enable debug
For example it's very common problem for PrestaShop users. (PrestaShop is using Symfony)