WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: ezxcess (138.217.40.---)
Date: July 31, 2019 12:29PM

I have a perfectly working Wampserver 3.1.9 (64bit) running on a Windows 10 Pro desktop. It comes with PHP version 5.6.40 to 7.3.5. The problem I have is that when I switch to a different version of PHP, the tray will always say that it is running PHP version 7.3.5. The only way is for me to know what PHP version is currently running is to run phpinfo() on a webpage.

Anyone had this issue before and how can I resolve it so Wampserver will show the correct version. Thanks for any assistance in advanced.

Options: ReplyQuote
Re: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: Otomatic (Moderator)
Date: July 31, 2019 01:14PM

Hi,

Please READ (and answer) BEFORE YOU ASK A QUESTION

- How do you switch the PHP version?

- Where do you look at the PHP version?

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27 - MariaDB 10.3.16
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27/8.0.17 - MariaDB 10.3.16
PhPMyadmin 4.9.0.1 - 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: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: ezxcess (138.217.40.---)
Date: July 31, 2019 03:19PM

Hi Otomatic. Like I said, the Wampserver is working fine. No errors and the icon is GREEN. Below are my answers to your 2 questions.

Q1: How do you switch the PHP version?
A1 : I click on the Wampserver icon on the systray then select PHP -> Version -> The PHP version I want to use. The Wampserver will restart but I check the systray again, it will ALWAY stay at version 7.3.5. I can see the version number (7.3.5) and when I am in the version tab, version 7.3.5 is always ticked.

Q2 : Where do you look at the PHP version?
A2 : I create a PHP file called info.php and in that file, I have the following code:-

<?php phpinfo(); ?>

That is how I checked what is the current version of PHP that Wampserver is running. This page will always show the PHP version I selected but in the Wampserver systray, it will ALWAYS show version 7.3.5 even if I select another PHP version.

Hope that made it clearer for everyone. Thanks.

Options: ReplyQuote
Re: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: Otomatic (Moderator)
Date: July 31, 2019 05:59PM

Hi,

This is the first time I have seen such a problem, so I ask you to answer many questions:

In Wampserver homepage (localhost), what are :
- Server Software:
- PHP Version:
In the file wamp64/wampmanager.conf, what is the line:
- phpVersion =

After changing php version (which version?) what are the same values above?

In the two cases, in the file httpd.conf, what is the line (about 203) LoadModule php7_module
Nota : Left-Click -> Apache -> httpd.conf

Have you installed Wampserver as an administrator?
Do you start Wampserver via its shortcut?

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27 - MariaDB 10.3.16
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27/8.0.17 - MariaDB 10.3.16
PhPMyadmin 4.9.0.1 - 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 »



Edited 1 time(s). Last edit at 07/31/2019 06:08PM by Otomatic.

Options: ReplyQuote
Re: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: ezxcess (138.217.40.---)
Date: July 31, 2019 06:10PM

These are the answers you requested.

=================================================================

This is when I selected PHP version 7.3.5

Server Software : Apache/2.4.39 (Win64) OpenSSL/1.1.1b PHP/7.3.5 mod_fcgid/2.3.9 - Port defined for Apache: 80
PHP Version: 7.3.5

DEFINE VERSION_PHP 7.3.5
LoadModule php7_module "${INSTALL_DIR}/bin/php/php7.3.5/php7apache2_4.dll"

=================================================================

This is when I selected PHP version 5.6.40. Wampserver restarted after I changed the PHP version.

Server Software : Apache/2.4.39 (Win64) OpenSSL/1.1.1b PHP/5.6.40 mod_fcgid/2.3.9 - Port defined for Apache: 80
PHP Version : 5.6.40

DEFINE VERSION_PHP 5.6.40
LoadModule php5_module "${INSTALL_DIR}/bin/php/php5.6.40/php5apache2_4.dll"

=================================================================

As you can see, the Wampserver works fine when switching between PHP versions. Only the Wampserver systray is not showing the correct PHP version as it is always showing PHP version 7.3.5 when it is actually running on PHP version 5.6.40.

Options: ReplyQuote
Re: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: ezxcess (138.217.40.---)
Date: July 31, 2019 06:15PM

This is the entry in wampmanager.conf when I am running on PHP version 7.3.5.

[php]
phpVersion = "7.3.5"
phpIniDir = "."
phpConfFile = "php.ini"
phpExeDir = "."
mysqlDefaultPort= "3306"

[phpCli]
phpCliVersion ="5.6.40"
phpExeFile = "php.exe"
phpCliFile = "php-win.exe"

=====================================================
This is the entry in wampmanager.conf when I am running on PHP version 5.6.40.

[php]
phpVersion = "5.6.40"
phpIniDir = "."
phpConfFile = "php.ini"
phpExeDir = "."
mysqlDefaultPort= "3306"

[phpCli]
phpCliVersion ="5.6.40"
phpExeFile = "php.exe"
phpCliFile = "php-win.exe"

Options: ReplyQuote
Re: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: ezxcess (138.217.40.---)
Date: July 31, 2019 06:21PM

I just noticed this error message in the localhost page:

*** ERROR ***
The PHP configuration loaded file is: c:/wamp64/bin/php/php7.3.5/php.ini
- should be: c:/wamp64/bin/apache/apache2.4.39/bin/php.ini
or c:/wamp64/bin/php/php7.3.5/phpforapache.ini

You must perform: Right-click icon Wampmanager -> Refresh

- This file is only for PHP in Command Line -
Maybe you've added 'PHPIniDir' in the 'httpd.conf' file. Delete or comment this line.

Options: ReplyQuote
Re: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: Otomatic (Moderator)
Date: July 31, 2019 06:37PM

Hi,

DEFINE VERSION_PHP 7.3.5
or
DEFINE VERSION_PHP 5.6.40

are not part of the original Wampserver 3.1.9 installation.
These lines have been added by you.

Just before the line LoadModule php7_module or LoadModule php5_module there should be:

PHPIniDir "${APACHE_DIR}/bin"

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27 - MariaDB 10.3.16
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27/8.0.17 - MariaDB 10.3.16
PhPMyadmin 4.9.0.1 - 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: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: Otomatic (Moderator)
Date: July 31, 2019 08:11PM

Hi,

On the other hand, it is extremely strange, even magical, that the PHP version number is not changed in the left-click menu of the systray while it is perfectly changed in wampmanager.conf.

Indeed, the PHP version number is interpreted from the information in wampmanager.conf by:
$configurationFile = '../wampmanager.conf';
...
// Loading Wampserver configuration
$wampConf = @parse_ini_file($configurationFile);
...
$c_phpVersion = $wampConf['phpVersion'];
...
then in wampmanager.tpl
Type: submenu; Caption: "PHP		${c_phpVersion}"; SubMenu: phpMenu; Glyph: 38
which results, after refreshing, in the file wampmanager.ini:
Type: submenu; Caption: "PHP		7.3.5"; SubMenu: phpMenu; Glyph: 38
And, if the PHP version changes to 5.6.40 in wampmanager.conf, this line of wampmanager.ini becomes:
Type: submenu; Caption: "PHP		5.6.40"; SubMenu: phpMenu; Glyph: 38
This displays the version number in the left-click menu of wampmanager.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27 - MariaDB 10.3.16
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27/8.0.17 - MariaDB 10.3.16
PhPMyadmin 4.9.0.1 - 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: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: ezxcess (1.132.104.---)
Date: August 01, 2019 02:02AM

Hi. This is the full entry in httpd.conf for both version

==================================
Wampserver running PHP version 7.3.5
==================================
PHPIniDir "${APACHE_DIR}/bin"
DEFINE VERSION_PHP 7.3.5
LoadModule php7_module "${INSTALL_DIR}/bin/php/php7.3.5/php7apache2_4.dll"
==================================

==================================
Wampserver running PHP version 5.6.40
==================================
PHPIniDir "${APACHE_DIR}/bin"
DEFINE VERSION_PHP 5.6.40
LoadModule php5_module "${INSTALL_DIR}/bin/php/php5.6.40/php5apache2_4.dll"
==================================

So that PHPIniDir entry is there in httpd.conf. Could that error in the localhost page be a possible cause for this?

Options: ReplyQuote
Re: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: Otomatic (Moderator)
Date: August 01, 2019 08:50AM

Hi,

I repeat :

DEFINE VERSION_PHP 7.3.5
and
DEFINE VERSION_PHP 5.6.40

Do not exist in the original Wampserver 3.1.9.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27 - MariaDB 10.3.16
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27/8.0.17 - MariaDB 10.3.16
PhPMyadmin 4.9.0.1 - 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: WampServer 3.1.9 64bit Not Showing The Correct PHP Version In Windows 10 Tray
Posted by: Otomatic (Moderator)
Date: August 01, 2019 10:59AM

Hi,

> The PHP configuration loaded file is: c:/wamp64/bin/php/php7.3.5/php.ini
> - should be: c:/wamp64/bin/apache/apache2.4.39/bin/php.ini

This is seen by phpinfo() launched from localhost page.

It must always be:

Loaded configuration file : c:\wamp64\bin\apache\apache2.4.39\bin\php.ini

regardless of the php version used.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27 - MariaDB 10.3.16
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27/8.0.17 - MariaDB 10.3.16
PhPMyadmin 4.9.0.1 - 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


Sorry, only registered users may post in this forum.