You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-20
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# WampServer PHP CLI Version Changer
2
-
WampServer PHP CLI version changer is a Microsoft Windows batch script that allows you to easily add and then change between available WampServer PHP CLI versions using the users environmental path.
2
+
WampServer PHP CLI Version Changer is a Microsoft Windows batch script that allows you to easily change between installed WampServer PHP CLI versions using the users environmental path.
3
3
4
4
## Minimum Requirements
5
5
The following are required for the CLI Changer script to function correctly.
@@ -11,43 +11,43 @@ No installation is required.
11
11
12
12
At just over 7kB the CLI Changer script is small enough to be saved anywhere in your file system.
13
13
14
-
**Note:** To operate seamlessly the Microsoft Windows "cmd.exe" executable must be in your system path. The standard installation path is ``C:\Windows\System32``.
15
-
16
14
**Tip:** Once you have save the CLI Changer script, create a desktop shortcut to it for quick and easy access.
17
15
18
16
## Configuration
19
-
If using a WampServer 32-bit version with default settings, then no configuration is necessary.
20
-
21
-
If using a WampServer 64-bit version **OR** a different install path was set during installation, then follow the steps below:
22
-
23
-
1. Open the CLI Changer script in your preferred text editor.
24
-
2. Change the value of the `$pathToInstall` variable to match that of your WampServer install path, taking care **not to** use quotes around the value.
25
-
3. Once you have changed the value, save and close your editor.
17
+
No configuration is necessary if your installed WampServer in its default directory.
26
18
27
-
For reference, the default WampServer install paths are:
19
+
The default installation directories are:
28
20
-`C:\wamp` - For 32-bit installations.
29
21
-`C:\wamp64` - For 64-bit installations.
30
22
23
+
If you installed WampServer in a custom directory, then follow the steps below:
24
+
25
+
1. Open the CLI Changer script in your preferred text editor.
26
+
2. Append your custom install path to the `$customInstallPath` variable.
27
+
3. Save the file and close your editor.
28
+
31
29
Example: A customised WampServer install path.
32
30
```
33
31
rem +------------------------------------------------+
34
32
rem | User Defined Variable(s) |
35
33
rem +------------------------------------------------+
36
34
37
-
rem WampServer install path.
38
-
set $pathToInstall=D:\WampServer64
35
+
rem WampServer custom install path.
36
+
set $customInstallPath=D:\WampServer 64-Bit
39
37
```
40
38
39
+
**IMPORTANT:** Do not add quotation marks around your custom installation path, even if the path contains spaces.
40
+
41
41
## How To Use
42
42
There are two ways you can use the CLI Changer script.
43
43
44
44
* Text based user interface (TUI).
45
45
* Command line interface (CLI).
46
46
47
47
### Text Based User Interface (TUI)
48
-
Upon running the CLI Changer script you will be presented with a numbered list of available PHP versions that you can select from.
48
+
Upon running the CLI Changer script you will be presented with a numbered list of installed PHP versions that you can select from.
49
49
50
-
The exact list of available PHP CLI versions is dependent on what you currently have in your WampServer PHP addon folder.
50
+
The exact list of installed PHP CLI versions is dependent on what you currently have in your WampServer PHP addon folder.
51
51
52
52
```
53
53
Available PHP CLI Versions
@@ -77,7 +77,7 @@ To select a PHP version:
77
77
78
78
The CLI Changer script will display the newly set PHP version number and prompt you to press any key to exit.
79
79
80
-
**Note:** The newly selected PHP version will only be available to new command line windows opened after the change. Existing windows will still reference any previously set PHP version.
80
+
**Note:** The newly selected PHP version will only be available to new command line windows. Existing windows will still reference the previously set PHP version.
81
81
82
82
To exit the CLI Changer script without making any changes just press the ENTER key.
83
83
@@ -86,11 +86,17 @@ Should you make an invalid selection or should the selection be the same as the
86
86
### Command Line Interface (CLI)
87
87
To update the PHP CLI version number directly from the command line, you can pass in the desired PHP version via the scripts first argument. This will bypass the selection screen and go straight to setting the desired version number.
**Note 1:** You will need to enclose the scripts path in double quotation marks if the path contains any spaces.
99
+
**Note 1:** You will need to enclose the CLI Changer script path in quotes if the path contains any spaces.
94
100
95
101
**Note 2:** You will need to know the available PHP CLI version(s) in advance prior to using this command.
96
102
@@ -106,7 +112,7 @@ Following execution, an exit code will be given:
106
112
As of WampServer v3.1.2 the below error message may be displayed.
107
113
108
114
```
109
-
ERROR C:/wamp or PHP in PATH"
115
+
Error C:/wamp or PHP in PATH
110
116
```
111
117
112
118
Clicking on this error will open a command window displaying the below message.
@@ -126,7 +132,7 @@ Wampserver does not use, modify or require the PATH environmental variable.
126
132
Using a PATH on Wampserver or PHP version
127
133
is detrimental to the proper functioning of Wampserver.
128
134
129
-
Press ENTER top continue...
135
+
Press ENTER to continue...
130
136
```
131
137
132
138
This error can be suppressed by right-clicking the WampServer icon in the taskbar notification area and selecting: _Wamp Settings -> Do not verify PATH_
0 commit comments