Hi,
Wampmanager scripts use PHP in CLI mode in exactly the same way as you would do it manually from the command line.
For example for "Show PHP loaded Extensions" the corresponding line in wampmanager.ini that will be executed by Aestan Tray Menu is:
Type: item; Caption: "Show PHP loaded Extensions"; Action: run; FileName: "E:/wamp64/bin/php/php7.4.33/php.exe"; Parameters: "msg.php phploadedextensions";WorkingDir: "E:/wamp64/scripts"; Flags: waituntilterminated; Glyph: 24
Corresponds well to a command line (CLI) launching php.exe with parameters which, in this case are a php script name itself with a parameter.
- php.exe to launch:
E:/wamp64/bin/php/php7.4.33/php.exe
- First parameter script to launch
msg.php
- Second parameter -> parameter for the script above
phploadedextensions
There is no third parameter, which means that it will be for the PHP version used as an Apache module.
To do it for a PHP version used in FCGI mode, you need to add a third parameter, for example:
FCGI7.4.33
This would give for a command line:
E:/wamp64/bin/php/php7.4.33/php.exe msg.php phploadedextensions
But, there is one more parameter given for Aestan Tray Menu, it is
WorkingDir: "E:/wamp64/scripts"
which means that the command line must be executed while being positioned in the folder E:/wamp64/scripts
So, we open a command windows as an administrator then type :
CD /D E:\wamp64\scripts
E:/wamp64/bin/php/php7.4.33/php.exe msg.php phploadedextensions
And it gives the same result as launched via the Wampmanager menu.
I can change PHP version to change CLI, of course if this version exists in Wampserver, for example
E:/wamp64/bin/php/php8.0.26/php.exe msg.php phploadedextensions FCGI7.4.33
This shows that the use of PHP in CLI mode is independent of Wampserver, of course provided that the version of PHP exists.Icing on the cake, it works even with Wampserver stopped.---------------------------------------------------------------
Documentation Apache -
Documentation PHP -
Documentation MySQL -
Wampserver install files & addons