After changing PHP, Menu shows previous version
Posted by: mario_lorenz (---.dip0.t-ipconnect.de)
Date: April 04, 2020 10:01PM

Good evening,

when i change the PHP-Version from PHP7.1.33 to PHP 7.2.25 via Aestran-Menu then PHP7.2.25 is selected (i could see it, when i run phpinfo on localhost), but the Aestran-Menu shows previous version PHP7.1.33.
The same is happen, if i try to change the php-cli-version. It feels like that the menu doesnt refresh. Restarting the Wamp server does not help.

I use the Aestran Tray Menu 3.2.2.8 on a Wampserver 3.2.0 64bit.

Can anyone understand that? Or knows what's wrong?

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: Otomatic (Moderator)
Date: April 05, 2020 09:24AM

Hi,

What is the content of the following lines in the wampmanager.conf file before and after the PHP version change via Left-Click -> PHP -> Version -> choose version?

- phpVersion =
- phpCliVersion =

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33 - MariaDB 10.5.9
Wampserver 3.2.4 64 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33/8.0.23 - MariaDB 10.5.9
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: mario_lorenz (---.dip0.t-ipconnect.de)
Date: April 06, 2020 09:36AM

Hi,

both lines changes correct during switch via menu:

before

phpVersion = "7.1.33"
phpCliVersion = "7.1.33"

after

phpVersion = "7.2.25"
phpCliVersion = "7.2.25"

i think, not the "wampmanager.conf" is the problem. It is the "wampmanager.ini". This file isnt change after switch the prp-version.

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: Otomatic (Moderator)
Date: April 06, 2020 11:46AM

Hi,

It could be rights on c:\wamp or something else depending on your setup.
Were the updates executed "as administrator?
Is Wampserver launched from its shortcut?

You can reinstall the updates "as administrator": Right-click on the file then "run as administrator".

- Wampserver update 3.2.0
- Aestan Tray Menu 3.2.2.8
And answer Yes if it says "Do you want to copy the files"

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33 - MariaDB 10.5.9
Wampserver 3.2.4 64 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33/8.0.23 - MariaDB 10.5.9
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: Otomatic (Moderator)
Date: April 06, 2020 12:13PM

Hi,

Important clarification : The Aestan Tray Menu must be updated last.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33 - MariaDB 10.5.9
Wampserver 3.2.4 64 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33/8.0.23 - MariaDB 10.5.9
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: mario_lorenz (---.dip0.t-ipconnect.de)
Date: April 07, 2020 08:59AM

Hi,

i run the wampmanager as Admin and i installed the update as admin. But nothing has changed in the situation. On a second machine, i´ve the same situation.

I didn't install the wampserver in the standard path, but under "d:\wamp_server\".

The default path may be hard-coded somewhere.

In any case, update installations recognize my path without problems and always suggest that I install the updates in my path.

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: Otomatic (Moderator)
Date: April 07, 2020 09:26AM

Hi,

> The default path may be hard-coded somewhere.
No.
The installation path is only known by the uninstall registry key:
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{wampserver32}_is1]
or
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{wampserver64}_is1]

It is through these keys that installers of updates or addons know the installation path.
And he knew from Wampmanager by the item
installDir ="E:/wamp64"
from the wampmanager.conf file

Regarder les erreurs éventuelles dans le fichier php_error.log

With Wampserver 3.2.0, there is a possibility to trace what happens during an operation such as switching versions of PHP, it's pretty basic, but we can see which files have been re-recorded.

For the explanations, I'm going to start from one of my E:/wamp64" installations, you'll have to modify the paths according to your own installation.

- Launch Wampserver
- Green icon and everything works fine, e.g. with PHP (web) 7.1.33
- Do not quit Wampserver
- Edit the file E:\wamp64\scripts\config.trace.php
- Replace : define('WAMPTRACE_PROCESS',FALSE);
by define('WAMPTRACE_PROCESS',TRUE);
- Save the modified file
- Switch PHP version
Left-Click -> PHP -> Version -> 7.2.25
- When the process of changing the PHP version is finished, without doing anything else, we will stop the trace
- Edit the file E:\wamp64\scripts\config.trace.php
- Replace : define('WAMPTRACE_PROCESS',TRUE);
by define('WAMPTRACE_PROCESS',FALSE);
- Save the modified file
Then we'll go see what the trace says:
Open the file E:\wamp64\logs\wamptrace.log and copy its contents here.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33 - MariaDB 10.5.9
Wampserver 3.2.4 64 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33/8.0.23 - MariaDB 10.5.9
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: mario_lorenz (---.dip0.t-ipconnect.de)
Date: April 07, 2020 04:57PM

Here is the log:

function wampIniSet
function linkPhpDllToApacheBin
- Wampserver trace report - Tue, 07 Apr 2020 16:36:24 +0200
script D:\wamp_server\scripts\config.trace.php WAMPTRACE_FILE=D:/wamp_server/logs/wamptrace.log
script D:\wamp_server\scripts\switchMysqlPort.php 3306
script D:\wamp_server\scripts\config.inc.php 3306
script D:\wamp_server\scripts\wampserver.lib.php 3306
function write_file file=D:/wamp_server/bin/mysql/mysql5.7.28/./my.ini
File D:/wamp_server/bin/mysql/mysql5.7.28/./my.ini -+- HAS BEEN WRITTEN -+-
function wampIniSet
function write_file file=D:/wamp_server/wampmanager.conf
File D:/wamp_server/wampmanager.conf -+- HAS BEEN WRITTEN -+-
- Wampserver trace report - Tue, 07 Apr 2020 16:36:24 +0200
script D:\wamp_server\scripts\config.trace.php WAMPTRACE_FILE=D:/wamp_server/logs/wamptrace.log
script D:\wamp_server\scripts\refresh.php
script D:\wamp_server\scripts\config.inc.php
script D:\wamp_server\scripts\wampserver.lib.php
function file_get_contents_dos - D:/wamp_server/wampmanager.tpl
function file_get_contents_dos - D:/wamp_server/bin/apache/apache2.4.41/conf/extra/httpd-vhosts.conf
function file_get_contents_dos - D:/wamp_server/bin/apache/apache2.4.41/conf/httpd.conf
function listen_ports
function check_virtualhost
function file_get_contents_dos - D:/wamp_server/bin/mysql/mysql5.7.28/./my.ini
function write_file file=D:/wamp_server/bin/mysql/mysql5.7.28/./my.ini
File D:/wamp_server/bin/mysql/mysql5.7.28/./my.ini -+- HAS BEEN WRITTEN -+-
function clean_file_contents
function file_get_contents_dos - D:/wamp_server/bin/apache/apache2.4.41/conf/httpd.conf
function file_get_contents_dos - D:/wamp_server/bin/apache/apache2.4.41/bin/php.ini
function clean_file_contents D:/wamp_server/bin/apache/apache2.4.41/bin/php.ini
script D:\wamp_server\scripts\refreshMySQL.php
function check_virtualhost
function listen_ports

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: Otomatic (Moderator)
Date: April 07, 2020 05:30PM

Hi,

It's missing the last two lines that should be (after function listen_ports) :
function check_virtualhost
function listen_ports
function write_file file=E:/wamp64/wampmanager.ini
File E:/wamp64/wampmanager.ini -+- HAS BEEN WRITTEN -+-
This shows that the wampmanager.ini file has not been modified.

Normally, the rewriting of wampmanager.ini is done at the end of the execution of the wamp/scripts/refresh.php script by:
// ************************
//The creation of wampmanager.ini file is complete, save the file.
write_file($wampserverIniFile,$tpl);

Have you looked at the log file php_error.log?

In your trace file, there is no call information to the final write_file function for the wampmanager.ini file whereas there are the previous calls for the my.ini and wampmanager.conf files.

I don't understand.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33 - MariaDB 10.5.9
Wampserver 3.2.4 64 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33/8.0.23 - MariaDB 10.5.9
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: mario_lorenz (---.dip0.t-ipconnect.de)
Date: April 07, 2020 07:15PM

I think i´ve found the problem.

I try to check the phperror.log. The file was extremly huge. I found the error-lines from wampserver at the end:

[07-Apr-2020 16:34:44] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1566142072 bytes) in D:\wamp_server\scripts\refresh.php on line 2263
[07-Apr-2020 16:36:25] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1566142264 bytes) in D:\wamp_server\scripts\refresh.php on line 2263

After cleaning the errorlog by hand, i could change the php-version without any problems.

There are some options for automatic cleaning the error-log. I never changed these settings. There is a check mark for automatic cleaning on 1000 lines. This option does not seem to have worked, or wampmanager tries and cannot. Is that possible?

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: Otomatic (Moderator)
Date: April 07, 2020 07:38PM

Hi,

> There is a check mark for automatic cleaning on 1000 lines. This option does not seem to have worked,
> or wampmanager tries and cannot. Is that possible?
Yes, it's possible.
For the Wampserver 3.2.1 update, there will be a quasi-systematic unset of variables after use if they are not used afterwards, especially for variables containing a lot of data.
For example, in the case that concerns us, the variable $tpl contains more than 8400 lines for about 640 kB and there are others in this case. The management of log file cleanup is also greatly improved.
In this way, we should avoid memory allocation overruns.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33 - MariaDB 10.5.9
Wampserver 3.2.4 64 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33/8.0.23 - MariaDB 10.5.9
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: After changing PHP, Menu shows previous version
Posted by: semyl (---.5-4.cable.virginm.net)
Date: January 20, 2021 08:17PM

I have been googling this issue for hours, updating and reinstalling updates, and finally solved it. Just thought I'd mention that the info above on using define('WAMPTRACE_PROCESS',TRUE); and what is supposed to show up was helpful.

Realised that for me it was getting stuck at:
function file_get_contents_dos - c:/wamp3/bin/apache/apache2.4.35/conf/extra/httpd-vhosts.conf - return=false


This file existed but was empty. I added a blank line and saved, and was then able to then switch PHP versions, the menu finally updated, and I could finally see the new PHP version I was trying to install.


Mentioning it here in case this is a bug, and this is the closest post I found to helping me.

Options: ReplyQuote


Sorry, only registered users may post in this forum.