title: How to solve Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2"
body: <p>After uploading my Laravel version 8.5 files. I keep getting this display instead of the landing page:
  <code>Composer detected issues in your platform: Your Composer dependencies require a PHP version &quot;&gt;= 8.0.2&quot;.</code></p>
  <p>I've run the following commands:
  <code>a2dismod php7.4</code></p>
  <p><code>a2enmod php8.1</code></p>
  <p><code>service apache2 restart</code></p>
  <p><code>update-alternatives --set php /usr/bin/php8.1</code></p>
  <p><code>update-alternatives --set phar /usr/bin/phar8.1</code></p>
  <p><code>update-alternatives --set phar.phar /usr/bin/phar.phar8.1</code></p>
  <p>I've also restarted Apache with:
  <code>/etc/init.d/apache2 restart</code></p>
  <p>But I keep getting the same display, even after clearing my browser cache.</p>
  <p>I'm sure Apache is still referencing the former PHP version according to:
  <code>phpinfo()</code></p>
  <p>Full Disclosure:
  I'm not proficient with Linux. My OS is Ubuntu 20.04, while my old PHP version is 7.4.29 and new PHP version is 8.1</p>