-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Process] Suppress warnings when open_basedir is non-empty #27141
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
If PHP is configured *with a non-empty open_basedir* value that does not permit access to the target location, these calls to is_executable() throw warnings. While Symfony may not raise exceptions for warnings in production environments, other frameworks (such as Laravel) do, in which case any of these checks causes a show-stopping 500 error. We fixed a similar issue in the ExecutableFinder class via #16182 . This has always been an issue, but 709e15e7a37cb7ed6199548dc70dc33168e6cb2d made it more likely that a warning is triggered.
This was recently rejected in #26473. Do we want to revise that decision? |
Well, currently, the PhpExecutableFinder is unusable with open_basedir. So I would say that this is one of the case where we should use |
I appreciate the desire not to use The alternatives seem to be:
I will say that I have mixed feelings about modifying my PHP configuration just to avoid warnings or errors that an arbitrary library will cause otherwise. In this specific instance, I'm not "purposely doing anything" with Whatever you all think... I'm not going to kick and scream. :) But I would like to know how best to determine which paths need to be added to Thanks! |
PhpExecutableFinder line:65 if (is_executable($php = PHP_BINDIR.('\\' === DIRECTORY_SEPARATOR ? '\\php.exe' : '/php'))) {
return $php;
} is_executable() throw warnings when open_basedir is non-empty ! |
Thank you @cbj4074. |
… (cbj4074) This PR was merged into the 2.7 branch. Discussion ---------- [Process] Suppress warnings when open_basedir is non-empty | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | If PHP is configured *with a non-empty open_basedir* value that does not permit access to the target location, these calls to is_executable() throw warnings. While Symfony may not raise exceptions for warnings in production environments, other frameworks (such as Laravel) do, in which case any of these checks causes a show-stopping 500 error. We fixed a similar issue in the ExecutableFinder class via #16182 . This has always been an issue, but symfony/process@709e15e made it more likely that a warning is triggered. Commits ------- 34f136e Suppress warnings when open_basedir is non-empty
If PHP is configured with a non-empty open_basedir value that does not permit access to the target location, these calls to is_executable() throw warnings.
While Symfony may not raise exceptions for warnings in production environments, other frameworks (such as Laravel) do, in which case any of these checks causes a show-stopping 500 error.
We fixed a similar issue in the ExecutableFinder class via #16182 .
This has always been an issue, but symfony/process@709e15e made it more likely that a warning is triggered.