PHP version conflict
Posted by: rajeshk.prosoft@gmail.com (102.115.236.---)
Date: June 08, 2022 11:45AM

I am running wamp server 3.2.6.
My PHP version (through PHP -V command) shows 8.1.0.

I created a laravel site using composer. It added laravel 9 I think.
Now, when I try to access it says, Composer dependencies require PHP >= 8.1.0,
You're using 7.4.26 in C:\wamp64\www\test1\vendor\composer\platform_check.php

How can I force wamp server to have PHP 8.1.0 by default?
Please help.

Rajesh

Options: ReplyQuote
Re: PHP version conflict
Posted by: Otomatic (Moderator)
Date: June 08, 2022 12:12PM

Hi,

The PHP version used by Wampserver is the one indicated in the Left-Click popup next to PHP.

> My PHP version (through PHP -V command) shows 8.1.0.

This PHP -V command, you do it in which folder?


See Right-Click -> Help -> Add Apache, PHP, MySQL, MariaDB, etc. versions

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: PHP version conflict
Posted by: rajeshk.prosoft@gmail.com (102.115.236.---)
Date: June 08, 2022 01:33PM

Hi Otomatic,

Thank you for your fast reply!

The php -v command I did in a command prompt window. From whichever folder I do that, it gives the same version.

The PHP version shown in wamp server dashboard is 7.4.26.

But, to get my laravel site (it's only a test site. I am in learning phase) run,
how can I make wamp server to use php ver 8.1.0 (that version has already been installed by wamp server)

Options: ReplyQuote
Re: PHP version conflict
Posted by: rajeshk.prosoft@gmail.com (102.115.236.---)
Date: June 08, 2022 02:22PM

Hi Otomatic,

I just saw you'd already suggested to see help -> info on versions.
Let me see that. Will try and if I need help, will come back here.

Thanks.

Options: ReplyQuote
Re: PHP version conflict
Posted by: Otomatic (Moderator)
Date: June 08, 2022 03:08PM

Hi,

> The php -v command I did in a command prompt window.

This means that you have a path to a PHP 8.1.0 version that is declared in the Windows PATH environment variable and it is not Wampserver that installed this path.
Wampserver does not add any path in the environment variables.

You should get:
C:\Windows\system32>php -v
php' is not recognized as an internal or external command
an executable program or a command file.

This path must be removed from the PATH environment variable.

Read item number 8 of [forum.wampserver.com]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 06/08/2022 03:11PM by Otomatic.

Options: ReplyQuote
Re: PHP version conflict
Posted by: rajeshk.prosoft@gmail.com (102.115.236.---)
Date: June 08, 2022 03:51PM

Hi,

I really appreciate your prompt replies to user queries.
Great!

Yes, I had added the path of php folder, now removed.

I have updated the Wamp server itself (now 3.2.9) and PHP & phpMyAdmin as well.

Now, my laravel test site (the basic laravel structure installed by composer) is appearing.
Fantastic!

Things seem to be good now. Now, I can proceed.


Thank you so much for your time!

Rajesh

Options: ReplyQuote


Sorry, only registered users may post in this forum.