Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

peuf's avatar
Level 1

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0".

I got this error when i tried to access my website after hosting it, it's shared hosting with php 8.1.0 and when i checked on my pc i had 8.1.1 there's someone that had the same issue but the proposed solutions were different and none of them worked for me or maybe i did not apply them correctly. pls help it's urgent

0 likes
2 replies
Snapey's avatar

php on the command line can be a different version to what the webserver sees

run php -v on the command line and check the version

1 like
peuf's avatar
peuf
OP
Best Answer
Level 1

i found the solution, it appears that on cpanel if you configure the php version before you upload the project your .htaccess file overwrites the one put by the cpanel to set the php version. So you have to upload the project then set the php version so that it is added to your current .htaccess

Please or to participate in this conversation.