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
BUGFIX: Make php binary setting check use realpath #2032
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the message is crystal-clear - it shows you two differently-cased paths. Is it really needed to automatically work around that? On a case-sensitive FS the check would now pass even when the case is wrong, so… I dare to object. Also since the number of installations on case-sensitive systems is way higher, I'd think.
Correct, but:
Edit: That check obviously is only for Web requests, while the check here in question is for CLI requests. |
I'm a bit indifferent to be honest, but since my review was requested: I'm with Karsten on this one, if you configure the path just consider the case whether it matters or not. When we decide to fix this, I'd vote for making the exception a bit clearer (or even detect this case and explain it, i.e. "the path differs only in casing which might not be a problem on the current file system but should be fixed anyways blah blah") |
Yeah, though at this point the issue is on windows this specifically basically never matters, but suddenly appears to (though in reality it still doesn't).
It's not about the setting, just about the check :) But as noticed above in the edit, the "subsequent" check is conditionally orthogonal to the one in question. I'll take another look, why we don't even check the PHP version for CLI requests, but only the Edit: Related to #1643 Okay, so to sum up the edge-case this is about:
The last point brings me to the observation, that the check tries to execute
So I have a probably better solution: use |
This avoids configured path case issues on windows systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙄 oh, PHP…
The check if the current executing php binary path as set in
PHP_BINARY
matches the given setting inphpBinaryPathAndFilename
was case-sensitive. This check is only done when the setting is specified and should guarantee that the path specified refers to the same binary as the one executing the current script. On Windows, the filesystem is case-insensitive by default though (Windows 10 has options to make it case-sensitive) and the chance that someone accidentially gets the casing of the path wrong on windows is (arguably) much more likely than someone having different versions of php installed on a case-sensitive filesystem in pathes/foo/PHP/php
and/foo/php/php
respectively.Even if that would be the case, if the two versions do not match the check atensureWebSubrequestsUseCurrentlyRunningPhpVersion
would still throw an error with an even more specific message.So this will prevent irritating errors on Windows in the form of