Skip to content

Commit 93e862e

Browse files
committed
updated readme
1 parent c008eac commit 93e862e

File tree

1 file changed

+35
-24
lines changed

1 file changed

+35
-24
lines changed

readme.md

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,41 @@
33
## Installation
44

55
1. Download and extract a [release archive](https://github.com/JanTvrdik/PhpVersionSwitcher/releases) to directory of your choice
6+
67
2. Update `PhpDir` and `HttpServerServiceName` options in `PhpVersionSwitcher.exe.config`
8+
79
3. Make sure the selected `PhpDir` has the following structure:
810

9-
```
10-
phpDir/
11-
├── configurations/
12-
│ ├── 5.x.x.ini # php.ini options for all 5.x.x versions
13-
│ ├── 5.3.x.ini # php.ini options for all 5.3.x versions
14-
│ ├── 5.3.7.ini # php.ini options specific for 5.3.7 version
15-
│ └── ...
16-
└── versions/
17-
├── 5.3.4/
18-
│ ├── ext/
19-
│ ├── ...
20-
│ └── php.exe
21-
└── 5.6.0-rc3/
22-
├── ext/
23-
├── ...
24-
└── php.exe
25-
```
26-
27-
In all php.ini files you can use `%phpDir%` variable. This is especially useful for `zend_extension`, e.g.
28-
29-
```
30-
zend_extension = "%phpDir%\ext\php_opcache.dll"
31-
zend_extension = "%phpDir%\ext\php_xdebug.dll"
32-
```
11+
```
12+
%phpDir%/
13+
├── configurations/
14+
│ ├── 5.x.x.ini # php.ini options for all 5.x.x versions
15+
│ ├── 5.3.x.ini # php.ini options for all 5.3.x versions
16+
│ ├── 5.3.7.ini # php.ini options specific for 5.3.7 version
17+
│ └── ...
18+
└── versions/
19+
├── 5.3.7/
20+
│ ├── ext/
21+
│ ├── ...
22+
│ └── php.exe
23+
└── 5.6.0-rc3/
24+
├── ext/
25+
├── ...
26+
└── php.exe
27+
```
28+
29+
4. Create php.ini files in the `configurations` directory. In all php.ini files you can use `%phpDir%` variable. This is especially useful for `zend_extension`, e.g.
30+
```
31+
zend_extension = "%phpDir%\ext\php_opcache.dll"
32+
zend_extension = "%phpDir%\ext\php_xdebug.dll"
33+
```
34+
35+
5. The active PHP version is always simlinked to `%phpDir%\active`. You may want to add this directory to `PATH`.
36+
37+
6. Update configuration of your HTTP server. The Apache 2.4 configuration related to PHP may look like this:
38+
```
39+
LoadModule php5_module "C:/Web/Soft/PHP/active/php5apache2_4.dll"
40+
PHPIniDir "C:/Web/Soft/PHP/active"
41+
```
42+
43+
7. Run `PhpVersionSwitcher.exe`.

0 commit comments

Comments
 (0)