Add deletion warning text file for configured active PHP
Posted by: WampyAdmin (91.216.236.---)
Date: May 11, 2026 11:52AM

Today I received a CVE alert for old versions of PHP on my system. I went to the downloads site and downloaded the latest addon php8.x.xx for each 8.x version and installed them all.

I checked to make sure Wampserver was stopped, then went to the C:\wamp64\bin\php\ folder

There is a warning file in that folder named
DO_NOT_DELETE_8.2.30.txt


Being careful not to delete that version, I removed all the other superseded php versions.

I tried to restart WampManager but it just hung.
I tried a restart of my system and then a restart of WampManager but it just hung.

I killed the process, and looked at the logs folder and there was a newly updated error file php_error.log

The errors were

[11-May-2026 08:26:44 UTC] PHP Warning: symlink(): No such file or directory in C:\wamp64\scripts\wampserver.lib.php on line 222
[11-May-2026 08:26:44 UTC] PHP Stack trace:
[11-May-2026 08:26:44 UTC] PHP 1. {main}() C:\wamp64\scripts\refreshSymlink.php:0
[11-May-2026 08:26:44 UTC] PHP 2. linkPhpDllToApacheBin($php_version = '8.3.28') C:\wamp64\scripts\refreshSymlink.php:23
[11-May-2026 08:26:44 UTC] PHP 3. symlink($target = 'c:/wamp64/bin/php/php8.3.28/phpForApache.ini', $link = 'c:/wamp64/bin/apache/apache2.4.65/bin/php.ini') C:\wamp64\scripts\wampserver.lib.php:222
[11-May-2026 08:26:44 UTC] Error while creating symlink 'c:/wamp64/bin/apache/apache2.4.65/bin/php.ini' to 'c:/wamp64/bin/php/php8.3.28/phpForApache.ini' using php symlink function

[11-May-2026 08:26:44 UTC] Symbolic link or file c:/wamp64/bin/apache/apache2.4.65/bin/php.ini does not exist


I noted in the stack trace - 2. linkPhpDllToApacheBin($php_version = '8.3.28')


I checked back to the C:\wamp64\bin\php\ directory and php8.3.28 was not there. It was one of the vulnerable php versions I had deleted.

It was still in my Recycle Bin so I restored it.

I launched WampManager again and it started up immediately.

I checked the TrayMenu->Php->Version and it showed 8.2.28 as the currently active PHP version.

While I understand my mistake (deleting the currently active php version) now, it would be a great improvement to provide a visual warning of the currently configured active php version in a similar manner to how the version currently used by WampManager is highlighted.

Perhaps you could have two files, for example

DO_NOT_DELETE_WAMPMANAGER_8.2.30.txt
DO_NOT_DELETE_ACTIVE_8.3.28.txt

and whenever the php version is changed through the TrayMenu, delete the existing ...ACTIVE.. file and create a new one for the newly selected active php version.


If this is not a change you wish to consider, perhaps a fall back position would be to

Provide a visual warning to the user that the "Configured PHP version (n.n.nn) is not found, setting manager version (n.n.nn) as active"
Perform a php version switch to the current WampManager version
Perform a Restart

Options: ReplyQuote
Re: Add deletion warning text file for configured active PHP
Posted by: Otomatic (Moderator)
Date: May 11, 2026 12:38PM

Hi,

There is a tool for removing unused versions of PHP, MySQL, MariaDB, or Apache, and this tool takes into account the versions currently in use:
Right-click -> Tools -> Remove Unused Versions

Do not delete anything manually!

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

Options: ReplyQuote
Re: Add deletion warning text file for configured active PHP
Posted by: WampyAdmin (91.216.236.---)
Date: May 11, 2026 05:22PM

That works too :-)

How long has that been hiding there?

Options: ReplyQuote
Re: Add deletion warning text file for configured active PHP
Posted by: Otomatic (Moderator)
Date: May 11, 2026 05:46PM

This has never been a secret!

It's been around since Wampserver 3.0.6 in august 2016

However, the 3.4.3 update will include:

DO_NOT_DELETE_8.2.31.txt
DO_NOT_DELETE_APACHE_8.5.6.txt
DO_NOT_DELETE_FCGI_8.1.34.txt
DO_NOT_DELETE_FCGI_8.3.31.txt

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



Edited 1 time(s). Last edit at 05/12/2026 12:23PM by Otomatic.

Options: ReplyQuote
Re: Add deletion warning text file for configured active PHP
Posted by: WampyAdmin (91.216.236.---)
Date: May 14, 2026 10:27AM

Thanks a million for that.

Options: ReplyQuote


Sorry, only registered users may post in this forum.