Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit f45f1e8

Browse files
author
Antonios Papadakis
committed
Lint README
1 parent 8dc8032 commit f45f1e8

File tree

1 file changed

+68
-54
lines changed

1 file changed

+68
-54
lines changed

README.md

Lines changed: 68 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,82 @@
11
# EZCompile-PHP
2+
23
### The Easy way to compile and install PHP on MacOS, Windows, and Linux. Status: pre-release, installs PHP CLI (latest-7.1-latest-master[including 8.0-betaX] Version, MacOS and Debian ONLY) and can setup a docker application for PHP-7.4.9, Apache-2.4.38, and MySQL-8.0.21 combined) HEAVY DEVELOPMENT
34

45
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/one-and-only/EZCompile-PHP?color=yellow&include_prereleases&label=latest)
5-
# How to Install PHP CLI (*macOS and Debian ONLY*):
6+
7+
# How to Install PHP CLI (_macOS and Debian ONLY_):
8+
69
### macOS:
7-
1. Open Terminal and navigate to ```[GITHUB-REPO-DIR]/macos/CLI/``` with ```[GITHUB-REPO-DIR]``` being the directory of this repository (```cd [GITHUB-REPO-DIR]/macos/CLI/```).
8-
1. Execute the install script that is inside the above directory by typing ```./install.sh```. This will install Homebrew if it not already installed, install all dependencies required for compiling the PHP CLI, compile the PHP CLI itself, test the build, and then install it. Do ***NOT*** run it with ```sudo ./install.sh``` even if you will be asked later on about your password. This is because Homebrew can't run as admin.
9-
10-
* You're able to choose the version of PHP you want to install between the latest releases of PHP 7.1, 7.2, 7.3, 7.4, 8.0-betaX, and the latest version of the master PHP branch.
11-
* You will be prompted to choose a version at the beginning of the program. There are other prompts inside of the program, but those should be really self-explanatory.
12-
1. After PHP CLI has been successfully installed, you can check that it has applied by executing ```php -v```. This will show you the PHP CLI version along with the build date and other information. The build version and date is what you need to pay attention to make sure it installed correctly. You're done!
10+
11+
1. Open Terminal and navigate to `[GITHUB-REPO-DIR]/macos/CLI/` with `[GITHUB-REPO-DIR]` being the directory of this repository (`cd [GITHUB-REPO-DIR]/macos/CLI/`).
12+
2. Execute the install script that is inside the above directory by typing `./install.sh`. This will install Homebrew if it not already installed, install all dependencies required for compiling the PHP CLI, compile the PHP CLI itself, test the build, and then install it. Do **_NOT_** run it with `sudo ./install.sh` even if you will be asked later on about your password. This is because Homebrew can't run as admin.
13+
14+
- You're able to choose the version of PHP you want to install between the latest releases of PHP 7.1, 7.2, 7.3, 7.4, 8.0-betaX, and the latest version of the master PHP branch.
15+
- You will be prompted to choose a version at the beginning of the program. There are other prompts inside of the program, but those should be really self-explanatory.
16+
3. After PHP CLI has been successfully installed, you can check that it has applied by executing `php -v`. This will show you the PHP CLI version along with the build date and other information. The build version and date is what you need to pay attention to make sure it installed correctly. You're done!
17+
1318
### Debian:
14-
1. Open Terminal and navigate to ```[GITHUB-REPO-DIR]/debian/CLI/``` with ```[GITHUB-REPO-DIR]``` being the directory of this repository (```cd [GITHUB-REPO-DIR]/debian/CLI/```).
15-
1. Execute the install script that is inside the above directory by typing ```./install.sh```. This will install all dependencies required to compile the PHP CLI using the Advanced Package Tool (APT), compile the PHP CLI itself, test the build, and then install it. If you so wish, you may run with ```sudo ./install.sh``` unlike macOS in order to get asked for your admin password once at the start, so you can leave it unattended longer.
16-
17-
* You're able to choose the version of PHP you want to install between the latest releases of PHP 7.1, 7.2, 7.3, 7.4, 8.0-betaX, and the latest version of the master PHP branch.
18-
* You will be prompted to choose a version at the beginning of the program. There are other prompts inside of the program, but those should be really self-explanatory.
19-
1. After PHP CLI has been successfully installed, you can check that it has applied by executing ```php -v```. This will show you the PHP CLI version along with the build date and other information. The build version and date is what you need to pay attention to make sure it installed correctly. You're done!
20-
# Installing the Docker Web Server Application (*All Major OSes*):
21-
## A. macOS (10.13+ [High Sierra+]):
22-
1. To install Docker Desktop by navigating to ```[GITHUB-REPO-DIR]/macos/Docker/dockerDesktop/``` with ```[GITHUB-REPO-DIR]``` being the directory of this repository (```cd [GITHUB-REPO-DIR]/macos/Docker/dockerDesktop/```).
23-
1. Now, install Docker Desktop by simply executing ```installDockerDesktop.sh```. You may be asked for your admin password depending on your installation environment.
24-
1. After installation is complete, you can launch Docker Desktop by doubl-clicking *Docker.app* in the applications folder.
25-
1. Now that docker is installed, open Terminal
26-
1. Navigate to ```[GITHUB-REPO-DIR]/macos/Docker/dockerFiles/```
27-
1. Once there, you can simply type ```docker compose up```. This will make sure that PHP, all of its extensions, Apache, and MySQL are all installed properly. If you so choose, you can close the application using *CTRL* + *C* in the Terminal where the application is open. After the initial install, you can use ```docker compose up -d```. This will run the application detached, meaning it will run in the background. You can stop the container
28-
1. All of your files used for a website will be stored under ```[GITHUB-REPO-DIR]/macos/Docker/dockerFiles/php/```. You can make a simple *index.php* file and whatever code you put in there will get processed by Apache. If you have an *index.php* or *index.html* file, you can access the website by typing ```localhost``` into your browser. Any other file name can be accessed from the browser by typing ```localhost/[fileName.extension]``` where ```[filePrefix.extension]``` is the full file name including the extension.
29-
* Accessing MySQL through PDO:
30-
1. I would recommend a database connection file (I'll call it *dbconn.php*)
31-
1. Information on how to setup the file can be found [here](https://phpdelusions.net/pdo). The one thing to remember is that you will need to replace host with the IP address of the Docker Container of MySQL.
32-
1. To get the IP address of the MySQL container, just execute ```docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysql8``` inside of Terminal while the container is running.
33-
1. To Stop the Docker Application, go to the directory that your Docker Application resides in, and then type ```docker compose stop```.
34-
## B. Windows 10 (Build 1803+):
35-
1. Navigate to the location of the Docker Desktop binary archives at ```windows/dockerDesktop/```.
36-
1. Open the text file that contains the password for the archives and copy it.
37-
1. Go back to the aforementioned folder above and double click, or execute, ```dockerDesktopInstaller_.exe```.
38-
1. When prompted, paste the password that you just copied into the text field and click OK. The archive should now start extracting.
39-
1. After the archive has been fully extracted, execute the output file by double-clicking on it. The installation should now begin.
40-
1. When prompted, restart your computer
41-
1. After the computer restart and Docker starts, it will prompt you to install the WSL2 linux kernel. Install it and restart docker when prompted.
42-
1. When docker has restarted, docker should be installed and available for use.
43-
1. Now that docker is installed, open PowerShell (***NOT*** Command Prompt)
44-
1. Navigate to ```[GITHUB-REPO-DIR]/windows/dockerFiles/```
45-
1. Once there, you can simply type ```docker compose up```. This will make sure that PHP, all of its extensions, Apache, and MySQL are all installed properly. If you so choose, you can close the application using *CTRL* + *C* in the Terminal where the application is open. After the initial install, you can use ```docker compose up -d```. This will run the application detached, meaning it will run in the background. You can stop the container
46-
1. All of your files used for a website will be stored under ```[GITHUB-REPO-DIR]/windows/dockerFiles/php/```. You can make a simple *index.php* file and whatever code you put in there will get processed by Apache. If you have an *index.php* or *index.html* file, you can access the website by typing ```localhost``` into your browser. Any other file name can be accessed from the browser by typing ```localhost/[fileName.extension]``` where ```[filePrefix.extension]``` is the full file name including the extension.
47-
* Accessing MySQL through PDO:
48-
1. I would recommend a database connection file (I'll call it *dbconn.php*)
49-
1. Information on how to setup the file can be found [here](https://phpdelusions.net/pdo). The one thing to remember is that you will need to replace host with the IP address of the Docker Container of MySQL.
50-
1. To get the IP address of the MySQL container, just execute ```docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysql8``` inside of PowerShell while the container is running.
51-
1. To Stop the Docker Application, go to the directory that your Docker Application resides in, and then type ```docker compose stop```.
52-
1. Done!
53-
## C. Debian-Based Linux Distributions (Debian, Ubuntu, Pop_OS!, etc.):
54-
1. Coming Soon!
19+
20+
1. Open Terminal and navigate to `[GITHUB-REPO-DIR]/debian/CLI/` with `[GITHUB-REPO-DIR]` being the directory of this repository (`cd [GITHUB-REPO-DIR]/debian/CLI/`).
21+
2. Execute the install script that is inside the above directory by typing `./install.sh`. This will install all dependencies required to compile the PHP CLI using the Advanced Package Tool (APT), compile the PHP CLI itself, test the build, and then install it. If you so wish, you may run with `sudo ./install.sh` unlike macOS in order to get asked for your admin password once at the start, so you can leave it unattended longer.
22+
23+
- You're able to choose the version of PHP you want to install between the latest releases of PHP 7.1, 7.2, 7.3, 7.4, 8.0-betaX, and the latest version of the master PHP branch.
24+
- You will be prompted to choose a version at the beginning of the program. There are other prompts inside of the program, but those should be really self-explanatory.
25+
3. After PHP CLI has been successfully installed, you can check that it has applied by executing `php -v`. This will show you the PHP CLI version along with the build date and other information. The build version and date is what you need to pay attention to make sure it installed correctly. You're done!
26+
27+
# Installing the Docker Web Server Application (_All Major OSes_):
28+
29+
## A. macOS (10.13+ [High Sierra+]):
30+
31+
1. To install Docker Desktop by navigating to `[GITHUB-REPO-DIR]/macos/Docker/dockerDesktop/` with `[GITHUB-REPO-DIR]` being the directory of this repository (`cd [GITHUB-REPO-DIR]/macos/Docker/dockerDesktop/`).
32+
2. Now, install Docker Desktop by simply executing `installDockerDesktop.sh`. You may be asked for your admin password depending on your installation environment.
33+
3. After installation is complete, you can launch Docker Desktop by doubl-clicking _Docker.app_ in the applications folder.
34+
4. Now that docker is installed, open Terminal
35+
5. Navigate to `[GITHUB-REPO-DIR]/macos/Docker/dockerFiles/`
36+
6. Once there, you can simply type `docker compose up`. This will make sure that PHP, all of its extensions, Apache, and MySQL are all installed properly. If you so choose, you can close the application using _CTRL_ + _C_ in the Terminal where the application is open. After the initial install, you can use `docker compose up -d`. This will run the application detached, meaning it will run in the background. You can stop the container
37+
7. All of your files used for a website will be stored under `[GITHUB-REPO-DIR]/macos/Docker/dockerFiles/php/`. You can make a simple _index.php_ file and whatever code you put in there will get processed by Apache. If you have an _index.php_ or _index.html_ file, you can access the website by typing `localhost` into your browser. Any other file name can be accessed from the browser by typing `localhost/[fileName.extension]` where `[filePrefix.extension]` is the full file name including the extension.
38+
- Accessing MySQL through PDO:
39+
1. I would recommend a database connection file (I'll call it _dbconn.php_)
40+
2. Information on how to setup the file can be found [here](https://phpdelusions.net/pdo). The one thing to remember is that you will need to replace host with the IP address of the Docker Container of MySQL.
41+
3. To get the IP address of the MySQL container, just execute `docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysql8` inside of Terminal while the container is running.
42+
8. To Stop the Docker Application, go to the directory that your Docker Application resides in, and then type `docker compose stop`.
43+
## B. Windows 10 (Build 1803+):
44+
9. Navigate to the location of the Docker Desktop binary archives at `windows/dockerDesktop/`.
45+
10. Open the text file that contains the password for the archives and copy it.
46+
11. Go back to the aforementioned folder above and double click, or execute, `dockerDesktopInstaller_.exe`.
47+
12. When prompted, paste the password that you just copied into the text field and click OK. The archive should now start extracting.
48+
13. After the archive has been fully extracted, execute the output file by double-clicking on it. The installation should now begin.
49+
14. When prompted, restart your computer
50+
15. After the computer restart and Docker starts, it will prompt you to install the WSL2 linux kernel. Install it and restart docker when prompted.
51+
16. When docker has restarted, docker should be installed and available for use.
52+
17. Now that docker is installed, open PowerShell (**_NOT_** Command Prompt)
53+
18. Navigate to `[GITHUB-REPO-DIR]/windows/dockerFiles/`
54+
19. Once there, you can simply type `docker compose up`. This will make sure that PHP, all of its extensions, Apache, and MySQL are all installed properly. If you so choose, you can close the application using _CTRL_ + _C_ in the Terminal where the application is open. After the initial install, you can use `docker compose up -d`. This will run the application detached, meaning it will run in the background. You can stop the container
55+
20. All of your files used for a website will be stored under `[GITHUB-REPO-DIR]/windows/dockerFiles/php/`. You can make a simple _index.php_ file and whatever code you put in there will get processed by Apache. If you have an _index.php_ or _index.html_ file, you can access the website by typing `localhost` into your browser. Any other file name can be accessed from the browser by typing `localhost/[fileName.extension]` where `[filePrefix.extension]` is the full file name including the extension.
56+
- Accessing MySQL through PDO:
57+
1. I would recommend a database connection file (I'll call it _dbconn.php_)
58+
2. Information on how to setup the file can be found [here](https://phpdelusions.net/pdo). The one thing to remember is that you will need to replace host with the IP address of the Docker Container of MySQL.
59+
3. To get the IP address of the MySQL container, just execute `docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysql8` inside of PowerShell while the container is running.
60+
21. To Stop the Docker Application, go to the directory that your Docker Application resides in, and then type `docker compose stop`.
61+
22. Done!
62+
## C. Debian-Based Linux Distributions (Debian, Ubuntu, Pop_OS!, etc.):
63+
23. Coming Soon!
64+
5565
# PLEASE NOTE:
66+
5667
### 1. Some PHP extensions may not be installed in all versions of the PHP CLI due to incompatibility or build errors. The PHP extensions that were removed from PHP 8 downwards are the following:
57-
* latest-7.4: ***enchant***
58-
* latest-7.3: ***enchant, iconv, TIDY***
59-
* latest-7.2: ***enchant, iconv, TIDY, GD, webp support, jpeg support, freetype, zip read/write support***
60-
* latest-7.1: ***enchant, iconv, TIDY, Argon2 Password Hashing, GD, webp support, jpeg support, freetype, sodium, zip read/write support***
61-
68+
69+
- latest-7.4: **_enchant_**
70+
- latest-7.3: **_enchant, iconv, TIDY_**
71+
- latest-7.2: **_enchant, iconv, TIDY, GD, webp support, jpeg support, freetype, zip read/write support_**
72+
- latest-7.1: **_enchant, iconv, TIDY, Argon2 Password Hashing, GD, webp support, jpeg support, freetype, sodium, zip read/write support_**
73+
6274
### 2. Due to the increased complexity and massively increased user input required to the point where you might as well compile it yourself on Windows, support for this operating system has been temporarily (and possibly permanently) limited to only the Docker Application in this project's roadmap until further notice.
6375

6476
### 3. If you find any issues or ommisions, please open up an issue on GitHub.
65-
---
77+
78+
* * *
79+
6680
#### Psst...Disclaimer:
6781

6882
This product includes PHP software, freely available from <http://www.php.net/software/>

0 commit comments

Comments
 (0)