PHP version does not update in Left-Click meni
Posted by: sebseb (---.28.213.195.dyn.plus.net)
Date: March 02, 2026 06:51PM

If I change the PHP version, it stays stuck on the same version in the Left-Click tray menu.
e.g. I change to 8.4.15
It updates httpd.conf and wampmanager.conf ok and makes the symlink to the correct phpForApache.ini
But the wampmanager.ini file is not update with the chosen PHP version, so the menu stays stuck, always showing 8.3.28
Cosmetic problem only, but it used to work fine. Broken in WAMP 3.4.0

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: Otomatic (Moderator)
Date: March 02, 2026 07:01PM

Right-Click -> Restart from zero

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

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: sebseb (---.28.213.195.dyn.plus.net)
Date: March 02, 2026 07:05PM

Actually, it's not just a cosmetic problem.

If I Exit WAMPServer via the right-click menu, then restart, it then reverts back to php 8.3.28.


Here's the full info:
I switch to PHP 8.4.15

wampmanager.conf now has:
[php]
phpVersion = "8.4.15"

httpd.conf now has:
LoadModule php_module "${INSTALL_DIR}/bin/php/php8.4.15/php8apache2_4.dll"

C:\wamp64\bin\apache\apache2.4.65\bin\php.ini is a sym link to
C:\wamp64\bin\php\php8.4.15\phpForApache.ini

phpinfo(); in a browser shows PHP Version 8.4.15

But the menu (and wampmanager.ini) still show 8.3.28


Now I exit and restart WAMPServer and the following changes happen:

C:\wamp64\bin\apache\apache2.4.65\bin\php.ini is a sym link to
C:\wamp64\bin\php\php8.3.28\phpForApache.ini

phpinfo(); in a browser shows PHP Version 8.3.28

Weirdly httpd.conf still has:
LoadModule php_module "${INSTALL_DIR}/bin/php/php8.4.15/php8apache2_4.dll"
So not sure why it's showing PHP Version 8.3.28 in phpinfo()

wampmanager.conf also still has:
[php]
phpVersion = "8.4.15"

Options: ReplyQuote
Re: PHP version does not persist when changed
Posted by: sebseb (---.28.213.195.dyn.plus.net)
Date: March 02, 2026 07:06PM

Updated subject

Options: ReplyQuote
Re: PHP version does not persist when changed
Posted by: sebseb (---.28.213.195.dyn.plus.net)
Date: March 02, 2026 07:10PM

> Right-Click -> Restart from zero

- This didn't help. Exact same behaviour as Exit and then restart as described above.

Options: ReplyQuote
Re: PHP version does not persist when changed
Posted by: Otomatic (Moderator)
Date: March 02, 2026 07:27PM

Apply wampmanager.ini repair available on https://wampserver.aviatechno.net/

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

Options: ReplyQuote
Re: PHP version does not persist when changed
Posted by: sebseb (---.28.213.195.dyn.plus.net)
Date: March 02, 2026 08:34PM

> Apply wampmanager.ini repair

I just did that and now it's broken wampmanager.ini - the left and right click menus are not working.

Most of the sections of wampmanager.ini are gone I think. It's only 79 lines long.

I should mention that this was basically a brand new fresh install of 3.4.0, nothing custom. I only added an older MySQL version.

(I had to do a complete uninstall and full new install from scratch, as when I did an update from 3.3.x the tray menus were missing, Same problem I have now after running wampmanager.ini repair!)

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: sebseb (---.28.213.195.dyn.plus.net)
Date: March 02, 2026 08:54PM

This is what wampmanager.ini looks like after the repair process:
[pastebin.com]
3KB compared to the usual 556KB

And even the WAMPSERVER version is wrong.

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: Otomatic (Moderator)
Date: March 03, 2026 09:04AM

Apply wampserver3.4.0 update

Do you use third-party antivirus software?

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

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: sebseb (---.idnet.net)
Date: March 03, 2026 08:50PM

Only the default Windows 10 antivirus, no 3rd party software.

Outbound firewall rules are set to block by default. Might this might make a difference? httpd is permitted. Maybe not every PHP version CLI exe is allowed outboard connections though.

I restored the wampmanager.ini from the save folder after the "repair" broke it, so the menus are working again now. Still have the problem with the PHP version not sticking though. Also the PHP extensions and settings shown in the menu are incorrect too (not matching the php.ini)

To clarify: you are asking me to apply the wampserver3.4.0 update over my fresh install of wampserver3.4.0?

Thank you;



Edited 1 time(s). Last edit at 03/03/2026 10:46PM by sebseb.

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: Otomatic (Moderator)
Date: March 04, 2026 09:47AM

Yes, I ask you to apply update 3.4.0 even if you already have version 3.4.0.
This reinstalls any files that may have been modified.

If that doesn't work...

- Exit Wampserver
- Edit the file : C:\wamp64\scripts\config.trace.php
Replace : define('WAMPTRACE_PROCESS', false); by define('WAMPTRACE_PROCESS', true);
Save the modified file.

- Launch Wampserver

Copy here the content of the file : C:\wamp64\logs\wamptrace.log

- Edit the file : C:\wamp64\scripts\config.trace.php
Replace : define('WAMPTRACE_PROCESS', true); by define('WAMPTRACE_PROCESS', false);
Save the modified file.

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



Edited 2 time(s). Last edit at 03/04/2026 11:14AM by Otomatic.

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: sebseb (---.idnet.net)
Date: March 04, 2026 01:40PM

Ok, so running the 3.4.0 update broke the wampmanager.ini in a similar way to the repair process (now the file is very incomplete and the menus stopped working).

With a working wampmanager.ini restored from backup, I set WAMPTRACE_PROCESS to true.

wamptrace.log after start-up:
[pastebin.com]

wamptrace.log after attempting to switch to PHP 8.4.15 in the menu:
[pastebin.com]

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: Otomatic (Moderator)
Date: March 04, 2026 03:43PM

There are "lots" of lines missing, including, of course, the most important one: the rewrite of the wampmanager.ini file!

Your last line is:
script C:\wamp64\scripts\refresh.php - Creating VirtualHosts submenu

it would be necessary afterwards:
script E:\wamp64\scripts\refresh.php - Creating Wampmanager settings submenu
script E:\wamp64\scripts\refresh.php - Creating change Wampserver browser tool menu
function write_file file=ListBrowsers.php
File ListBrowsers.php -+- HAS BEEN WRITTEN -+-
script E:\wamp64\scripts\refresh.php - Creating delete old versions tool menu
function ListAllVersions
script E:\wamp64\scripts\refresh.php - Creating delete Listen Port Apache menu
function write_file file=E:/wamp64/wampmanager.ini
File E:/wamp64/wampmanager.ini -+- HAS BEEN WRITTEN -+-
script E:\wamp64\scripts\refresh.php - End of create wampmanager.ini file from template file
function GetApacheLoadedModules 2.4.66.3
function write_file file=E:/wamp64/files/apacheloadedmodules.php
File E:/wamp64/files/apacheloadedmodules.php -+- HAS BEEN WRITTEN -+-
script E:\wamp64\scripts\refresh.php - End of the script refresh.php

Check the Apache and PHP log files for any errors.

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

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: sebseb (---.idnet.net)
Date: March 04, 2026 10:13PM

I have log_errors = Off for my dev environment so C:\wamp64\logs\php_error.log was empty.


With errors on for the PHP CLI used by WAMP, and get this:

[04-Mar-2026 19:45:04 UTC] PHP Warning: Undefined variable $server_name in C:\wamp64\scripts\refresh.php on line 3076
[04-Mar-2026 19:45:04 UTC] PHP Stack trace:
[04-Mar-2026 19:45:04 UTC] PHP 1. {main}() C:\wamp64\scripts\refresh.php:0
[04-Mar-2026 19:45:04 UTC] PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in C:\wamp64\scripts\refresh.php:3076
Stack trace:
#0 {main}
thrown in C:\wamp64\scripts\refresh.php on line 3076

Probably because in httpd.conf I have this line commented out:
#Include conf/extra/httpd-vhosts.conf
All my <VirtualHost> entries are directly in the httpd.conf


So I moved them all into httpd-vhosts.conf and just commented out the default <VirtualHost *:80> entry at the start. Now it gives this warning, but at least no fatal error:

--- File cleaned up by Wampserver on 2026-03-04 20:23 ---
[04-Mar-2026 20:23:21 UTC] PHP Warning: Undefined variable $myreplaceHttps in C:\wamp64\scripts\refresh.php on line 3096
[04-Mar-2026 20:23:21 UTC] PHP Stack trace:
[04-Mar-2026 20:23:21 UTC] PHP 1. {main}() C:\wamp64\scripts\refresh.php:0
[04-Mar-2026 20:23:21 UTC] PHP Warning: Undefined variable $myreplacesubmenuHttps in C:\wamp64\scripts\refresh.php on line 3096
[04-Mar-2026 20:23:21 UTC] PHP Stack trace:
[04-Mar-2026 20:23:21 UTC] PHP 1. {main}() C:\wamp64\scripts\refresh.php:0


So I think there are some bugs in refresh.php
I guess it's intended to check the conf files and warn if something isn't right, but shouldn't crash with a fatal error.

It's probably the reason why some people have problems with missing tray menus because during the update process it resets the wampmanager.ini but then crashes before re-writing it.

That's exactly what happened with me: I updated to 3.4.0 and the menus disappeared because it no longer worked with my VirtualHost set up. Then I did a fresh install but set up httpd.conf in the same way, so the menus wouldn't update.


Here's a minimal version of httpd-vhosts.conf if you want to reproduce the 2nd error:

Listen 80
<VirtualHost *:80>
DocumentRoot "C:/WORK/Websites/lib"
</VirtualHost>

Or you can comment out the include in httpd.conf and put the VirtualHost there to reproduce the 1st error.
i.e.
#Include conf/extra/httpd-vhosts.conf

Listen 80
<VirtualHost *:80>
DocumentRoot "C:/WORK/Websites/lib"
</VirtualHost>

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: Otomatic (Moderator)
Date: March 05, 2026 09:26AM

> Probably because in httpd.conf I have this line commented out:
> #Include conf/extra/httpd-vhosts.conf
> All my <VirtualHost> entries are directly in the httpd.conf

Wampserver works correctly the first time around if you don't mess around with the configuration without knowing the implications.

VirtualHosts are in httpd-vhosts.conf and nowhere else.

Similarly, https VirtualHosts are in httpd-ssl.conf and nowhere else.

Do not modify "things" without knowing the implications.

Yes, refresh.php checks a large number of parameters.

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

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: sebseb (---.idnet.net)
Date: March 05, 2026 02:47PM

> Do not modify "things" without knowing the implications.

I get your point of course.

But bear in mind that I've worked for many years with WAMP. (I think it didn't always have the feature to configure virtual hosts via a UI. Or maybe I just preferred to edit conf files. It's been so long I have this configuration that I don't remember exactly.)

My point was that a configuration that was working perfectly with a previous version of WAMP (3.3.x) then breaks after updating to 3.4.0 - the tray menus stopped working because the wampmanager.ini can't be built due to PHP fatal error.

My suggestion was only that refresh.php should output a warning to the user if it can't handle the state of the conf files, rather than silently exit with a fatal error. I think this would help reduce the number of people asking for help on this forum (I saw quite a lot of posts relating to tray menus not working for example).

I do also want to say that I really appreciate your assistance in tracking down the problem in this case. I'm easily able to fix it now I know what's going on. I also appreciate all the work you've put into WAMP itself. It's a great framework.

Many thanks,
Seb



Edited 1 time(s). Last edit at 03/05/2026 02:52PM by sebseb.

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: Otomatic (Moderator)
Date: March 05, 2026 03:15PM

Hi,

> My suggestion was only that refresh.php should output a warning to the user
> if it can't handle the state of the conf files
This is what is done for a number of checks, but it cannot be done for VirtualHosts, on which many things depend:
- page localhost
- page Add a Virtualhost
-- modify VirtualHost
-- switch to FCGI mode
- pass a VirtualHost into https mode

I seem to remember that VitualHosts became mandatory with version 3.3.3?

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

Options: ReplyQuote
Re: PHP version does not update in Left-Click meni
Posted by: sebseb (---.idnet.net)
Date: March 05, 2026 03:32PM

That would explain things - I was updating from 3.3.1

Anyway, all good now. I moved the VirtualHost sections into https-vhosts.conf which fixes the fatal error. And added a ServerName entry for <VirtualHost *:80> which fixes the warning.

Thanks again,
Seb

Options: ReplyQuote


Sorry, only registered users may post in this forum.