Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4fromShaiMagal:5.4
Nov 2, 2023

Conversation

ShaiMagal
Copy link
Contributor

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
Issues
LicenseMIT

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

  • Then you will see error 500
    -> After this PR/commit, it's without problem.

For example it's very common problem for PrestaShop users. (PrestaShop is using Symfony)

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.4 branch.

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!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@ShaiMagal
Copy link
ContributorAuthor

@stof Updated :)

@carsonbotcarsonbot changed the titlePreventing error 500 when function putenv is disabled[HttpKernel] Preventing error 500 when function putenv is disabledNov 2, 2023
@ShaiMagal
Copy link
ContributorAuthor

ShaiMagal commentedNov 2, 2023
edited
Loading

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.

@stof
Copy link
Member

stof commentedNov 2, 2023

@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)

ShaiMagal reacted with heart emoji

@fabpot
Copy link
Member

Should we do the same insrc/Symfony/Component/BrowserKit/AbstractBrowser.php andsrc/Symfony/Component/Runtime/SymfonyRuntime.php?

@nicolas-grekas
Copy link
Member

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.

@fabpot
Copy link
Member

Thank you@ShaiMagal.

ShaiMagal reacted with heart emoji

@fabpotfabpot merged commitb421063 intosymfony:5.4Nov 2, 2023
@ShaiMagalShaiMagal deleted the 5.4 branchNovember 2, 2023 20:49
This was referencedNov 10, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@stofstofstof requested changes

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

@derrabusderrabusderrabus approved these changes

@xabbuhxabbuhxabbuh approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
5.4
Development

Successfully merging this pull request may close these issues.

8 participants
@ShaiMagal@carsonbot@stof@fabpot@nicolas-grekas@OskarStark@derrabus@xabbuh

[8]ページ先頭

©2009-2025 Movatter.jp