Skip to content
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

Open
2 tasks done
gitneko opened this issue Aug 27, 2020 · 2 comments
Open
2 tasks done

Upgrade script assumes "php" points to a supported PHP binary #8381

gitneko opened this issue Aug 27, 2020 · 2 comments
Labels

Comments

@gitneko
Copy link

gitneko commented Aug 27, 2020

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 use shell_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

  • Snipe-IT Version 4.9.4
  • Is this a fresh install or an upgrade? Upgrade.
  • What OS and web server you're running Snipe-IT on? Linux with Nginx and Apache.
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)? Previous installation was manual but I was switching to git.
@snipe
Copy link
Owner

snipe commented Aug 29, 2020

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.

@stale
Copy link

stale bot commented Dec 25, 2020

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

@stale stale bot added the stale label Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants