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

Commit

Permalink
Upgrade to php 7.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomilon committed Dec 6, 2020
1 parent e1a286d commit 2723d2f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ EzPHP gives you a personal PHP webserver for development.

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

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
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

### Installation

1. Download [ezphp.zip](https://github.com/marcomilon/ezphp/releases/download/1.2.0/ezphp.zip).
1. Download [ezphp.zip](https://github.com/marcomilon/ezphp).
2. Create a new folder for your project and copy ezphp.exe.
3. Run ezphp.exe. If PHP is not installed locally ezphp will try to download and install PHP.
4. Open your browser in http://localhost:8080.
Expand Down
18 changes: 11 additions & 7 deletions internal/php/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func FastInstall(source, installFolder string) (string, error) {

var confirmation string

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

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

filename := path.Base(source)

resp, err := http.Get(source)
if err != nil {
return "", err
}
defer resp.Body.Close()

if resp.StatusCode != 200 {
return "", fmt.Errorf("error %d\n", resp.StatusCode)
}

if _, err := os.Stat(installFolder); os.IsNotExist(err) {
err = os.MkdirAll(installFolder, 0755)
if err != nil {
return "", err
}
}

resp, err := http.Get(source)
if err != nil {
return "", err
}
defer resp.Body.Close()

out, err := os.Create(installFolder + string(os.PathSeparator) + filename)
if err != nil {
return "", err
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

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

func main() {
Expand Down

0 comments on commit 2723d2f

Please sign in to comment.