Skip to content
This repository was archived by the owner on Apr 1, 2023. It is now read-only.

Commit 2723d2f

Browse files
committed
Upgrade to php 7.4.13
1 parent e1a286d commit 2723d2f

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ EzPHP gives you a personal PHP webserver for development.
44

55
The goal of the project is to provide a single **.exe** file that will get you a ready to use PHP development environment.
66

7-
EzPHP will install PHP v. 7.4.10 downloaded from https://windows.php.net/downloads/releases/php-7.4.10-nts-Win32-vc15-x64.zip
7+
EzPHP will install PHP v. 7.4.13 downloaded from https://windows.php.net/downloads/releases/php-7.4.13-nts-Win32-vc15-x64.zip
88

99
### Installation
1010

11-
1. Download [ezphp.zip](https://github.com/marcomilon/ezphp/releases/download/1.2.0/ezphp.zip).
11+
1. Download [ezphp.zip](https://github.com/marcomilon/ezphp).
1212
2. Create a new folder for your project and copy ezphp.exe.
1313
3. Run ezphp.exe. If PHP is not installed locally ezphp will try to download and install PHP.
1414
4. Open your browser in http://localhost:8080.

internal/php/installer.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func FastInstall(source, installFolder string) (string, error) {
3131

3232
var confirmation string
3333

34-
fmt.Print("Would you like to install PHP version 7.4.10? [y/N] ")
34+
fmt.Print("Would you like to install PHP version 7.4.13? [y/N] ")
3535
fmt.Scanln(&confirmation)
3636

3737
confirmation = strings.TrimSpace(confirmation)
@@ -68,19 +68,23 @@ func download(source, installFolder string) (string, error) {
6868

6969
filename := path.Base(source)
7070

71+
resp, err := http.Get(source)
72+
if err != nil {
73+
return "", err
74+
}
75+
defer resp.Body.Close()
76+
77+
if resp.StatusCode != 200 {
78+
return "", fmt.Errorf("error %d\n", resp.StatusCode)
79+
}
80+
7181
if _, err := os.Stat(installFolder); os.IsNotExist(err) {
7282
err = os.MkdirAll(installFolder, 0755)
7383
if err != nil {
7484
return "", err
7585
}
7686
}
7787

78-
resp, err := http.Get(source)
79-
if err != nil {
80-
return "", err
81-
}
82-
defer resp.Body.Close()
83-
8488
out, err := os.Create(installFolder + string(os.PathSeparator) + filename)
8589
if err != nil {
8690
return "", err

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313

1414
const (
1515
ezPHPWebsite = "https://github.com/marcomilon/ezphp"
16-
downloadURL = "https://windows.php.net/downloads/releases/php-7.4.10-nts-Win32-vc15-x64.zip"
17-
installFolder = "php-7.4.10"
16+
downloadURL = "https://windows.php.net/downloads/releases/php-7.4.13-nts-Win32-vc15-x64.zip"
17+
installFolder = "php-7.4.13"
1818
)
1919

2020
func main() {

0 commit comments

Comments
 (0)