-
-
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
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.2". #14929
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
Are you sure your cli version of PHP is the same as your web version? This is tested on 8.1.2. Try running |
cli version is showing as 8.2.19 which should meet the composer requirements? Or is there something I'm missing? |
Just to add, the CLI version is changed along with the web version when changing the PHP version in Cpanel. So when I raised this yesterday we were testing with PHP 8.1. If I change it back to that now, the exact CLI version is 8.1.28 |
That should definitely work within the requirements. Can you show me the output of running these commands via cli?
|
Sure!
|
Looks like composer worked that time then? Are you upgraded now? |
Unfortunately not. It's still showing the error 'Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.2".' when navigating to the web GUI. This is a fresh install too so it should be loading the pre-flight page. |
Can you show me a screenshot? I'm not even sure what that would look like, although admittedly we don't always check the QuickStart as often as we should |
Aha - that's generated by Composer.
|
Oh, what version of composer are you running? You might also try |
(What's weirder is that if the platform requirements weren't met, it's expect the |
Although that's what the host is using. I followed the local install steps so the project version is the latest:
|
Okay, is it possible your php-fpm (or whatever it is you're using for the web - not cli - PHP is older than 8.1.2?) That's the only thing left I can think of. That file gets autoloader with the web app itself, so it's not looking at cli, it's looking at your apache module or php-fpm version, which can be different. |
You're a bloody star. I added a phpinfo to the public directory and sure enough it was on 8.0.30 (our host has just merged and migrated their servers over to GoDaddy...they're shite so it appears they've removed the option to change this in CPanel). If anyone else has this issue, I added:
to the .htaccess file in the /snipe/public folder and this has forced the correct version. Now the joys of restoring all the data from our previous install 🙃 Thanks for all your help with this <3 |
Hah - excellent, so glad you're sorted. You should just be able to use the backup tool on the old install to generate a backup and then upload it into the new version. https://snipe-it.readme.io/docs/backups
|
(GoDaddy is THE WORST btw. Well, no, Site5 is the actual worst, but they're still pretty terrible.) |
I'll mark this as resolved for now, but I'll keep an eye on it in case you need any more help with the backup stuff. |
Sadly, I forgot that the inbuilt backup tool exists so thought I was being extra careful by taking a full root directory and db backup before clearing it...stupid I know but that's what sitting here at 4AM troubleshooting does to you. Will it work if I restore the uploads directory, .env and uploads directory manually? |
Oh tell me about it. We moved away from them years ago but sadly they seem to be buying everyone up now. |
Yah, that link shows you what you need to include. Database backup, public uploads dir, your storage/private uploads dir and your OAuth keys in that storage dir. Zip that up and your restore tool should work (as long as you don't have db table prefixes - check that first.) You should probably also move your APP_KEY from the old env, but likely leave the other new settings in your new env alone. |
Great, I'll try that now |
It's 2:40AM here (🇵🇹), so depending on how it works out, I might have to get back to you tomorrow if you need any help with the backup. |
(If you don't want to risk the restore tool, you can always manually copy those uploaded files, OAuth keys, and then import your database via Cpanel. That works just as well, just make sure you run |
No worries, I'm UK based so same here! I'll be sure to post an update here and let you know how it goes. Thanks again for all your help 🍻 |
Looks like the in-built restore tool has worked perfectly 🏆 Thanks again. I owe you a beer and some when I next make it to Lisbon! |
Excellent - glad you're all set! (I'm more of a vinho verde lady myself, but I can do beer just fine. :D) |
i´ll hitchhike this comment section, as i ran into the same problem after the update.
Was an easy fix for me, maybe it also works for someone else. |
Hi, I have the same issue as narrated by @oliverjnash but neither editing the .htaccess file working for me nor disabling PHP version. https://assets-uat.newglobe.education/ |
Although I ran into the exact same issue as @oliverjnash after updating from php8.0 to php8.1, though the .htaccess addition did not solve my issue, after seeing that phpinfo was still reporting at 8.0.xx, @DasRedy's remedy helped as well! Thank you all for the great documentation 🥳 |
Debug mode
Describe the bug
After upgrading to V7 we kept receiving the error 'Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.2".'. We've confirmed that this issue occurs regardless of the PHP version used (have tried with 8.1 and 8.2).
After researching and attempting a number of troubleshooting steps, I decided to backup the DB and config files and reinstall from scratch. However, upon re-installing, we're still receiving the same error message.
Reproduction steps
1.Install Snipe and dependencies as per the docs (Git clone method)
2. Navigate to the pre-flight page
...
Expected behavior
Snipe should display the pre-flight page for further configuration.
Screenshots
No response
Snipe-IT Version
7.0.4
Operating System
Ubuntu
Web Server
Apache
PHP Version
8.1.28
Operating System
Windows 11
Browser
Edge
Version
Version 126.0.2592.61 (Official build) (64-bit)
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
No response
The text was updated successfully, but these errors were encountered: