Cannot switch my PHP version
Posted by: papijo (---.w2-10.abo.wanadoo.fr)
Date: March 14, 2025 11:47PM

Hello!
Windows 11 - Wampserver Version 3.3.7 - Apache 2.4.58 - MySQL 2.4.3
Running fine on PHP 8.2.13...with a few Moodle and WordPress local sites.
Just wanted to install a new version of Drupal, using composer. Got error:: composer requires PHP 8.3. On my Wampserver I have PHP 8.3.0 and 8.3.18.
OK, in Wampserver services I switch from PHP 8.2.13 to PHP 8.3.18). Things look OK, Wampserver indicates current PHP version is indeed PHP 8.3.18, try again to install Drupal, same error Composer need PHP 8.3+.
In Windows console, type "php -v" and get result:
PHP 8.2.13 (cli) (built: Nov 21 2023 16:09:25) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.13, Copyright (c) Zend Technologies
with Zend OPcache v8.2.13, Copyright (c), by Zend Technologies
with Xdebug v3.2.2, Copyright (c) 2002-2023, by Derick Rethans
---
So my PHP version is stil the old one 8.2.13
Asked help from ChatCPT which advises:
Open C:\wamp\bin\apache\apache[version]\conf\httpd.conf
LoadModule php_module "c:/wamp/bin/php/phpX.X.X/php[version].dll"
done that, I can see tongue sticking out smileyHPIniDir "${APACHE_DIR}/bin"
LoadModule php_module "${INSTALL_DIR}/bin/php/php8.3.18/php8apache2_4.dll"
which is OK
and also:
Open C:\wamp\wampmanager.conf
Find phpVersion and update it to the desired version.
I see: phpVersion = "8.3.18"
--------
What to do next?

Options: ReplyQuote
Re: Cannot switch my PHP version
Posted by: Otomatic (Moderator)
Date: March 15, 2025 08:53AM

Hi,

Right-Click -> Restart from zero

PS : vu l'adresse en wanadoo.fr, je vous signale qu'il existe un forum francophone.

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

Options: ReplyQuote
Re: Cannot switch my PHP version
Posted by: papijo (---.w2-10.abo.wanadoo.fr)
Date: March 15, 2025 11:27AM

Thanks for the fast reply, Otomatic!

OOps, I thought I had done that already (Restart all services) but I just did it and my Moodle sites and Drupal and Wordpress correctly report PHP version 8.3.18
Strangely my Windows console still reports previous installed PHP version 8.2.13 !!!
Now I need to re-try installing Drupal 10 or 11 with composer (and I'll report here).


PS.- Oui, je sais, mais pour les questions techniques je préfère poster en anglais...



Edited 1 time(s). Last edit at 03/15/2025 11:42AM by papijo.

Options: ReplyQuote
Re: Cannot switch my PHP version
Posted by: Otomatic (Moderator)
Date: March 15, 2025 11:58AM

> Restart all services
Ce n'est absolument pas la même chose que Redémarrer de zéro.

Voir l'Aide à ce sujet.

C'est quoi votre "Windows Console" ?

PS : Voir en haut du clic-gauche : Made in France by Dominique Ottello
C'est moi. Étant quasiment le seul à répondre, je préfère que les français utilisent le forum francophone.

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

Options: ReplyQuote


Sorry, only registered users may post in this forum.