-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Upgrade script assumes "php" points to a supported PHP binary #8381
Comments
This seems more like a system configuration issue, not really a Snipe-IT issue. We'd be willing to take a (tested) PR for this, but it's not really going to be on the short-term roadmap. |
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. |
Please confirm you have done the following before posting your bug report:
Describe the bug
The upgrade script assumes that
php
points to a supported PHP binary. On some systems it points however to an older installation.To Reproduce
Steps to reproduce the behavior:
Make
/usr/bin/php
a symlink to an older PHP version (i.e. 5.6) and then run the upgrade script. The output contains many PHP syntax errors related to?
.Expected behavior
The upgrade script uses the same binary as it is run with. But instead
php
is assumed to be linked to the correct binary.Proposed solution
Instead of
shell_exec('php ....
, the upgrade script should useshell_exec(PHP_BINARY.' ...
to go around that issue. Although it may risk that if the path includes a space, then it need to be surrounded by quotes. So you may want to add these, although I don't think many have spaces in their path to the PHP binary.Additional context
The text was updated successfully, but these errors were encountered: