WEBVTT

00:00.140 --> 00:02.780
So now let's install PHP on windows.

00:02.870 --> 00:07.490
I also have a tutorial for that on my website, so we're going to be going through it.

00:07.520 --> 00:10.820
Now the first step is to download PHP.

00:10.940 --> 00:12.020
I got the link right here.

00:12.020 --> 00:13.700
You can just click.

00:13.730 --> 00:21.740
And as I say right here, you should download a non-threat safe version and just aim for the most recent

00:21.740 --> 00:24.770
one at the time you can find.

00:24.770 --> 00:27.680
So for me that would be this one.

00:27.680 --> 00:37.760
Let me download this zip file and after it finishes up, we're gonna have to extract this into some

00:37.760 --> 00:38.990
kind of a folder.

00:39.020 --> 00:41.660
Now it happens so that I already did that.

00:41.660 --> 00:45.380
So I can grab a file I've previously downloaded.

00:45.410 --> 00:54.320
Then you need to right click on it and find an Extract All option and select the folder where you want

00:54.590 --> 00:55.520
PHP to go.

00:55.550 --> 00:57.740
That's for example local disk.

00:58.040 --> 01:01.350
It can be anywhere as long as you remember.

01:01.350 --> 01:03.510
Where did you extract that?

01:03.510 --> 01:07.530
Because it will be useful later on.

01:07.560 --> 01:09.180
Let me count this folder.

01:09.420 --> 01:13.050
PHP eight and just hit extract and just wait for it.

01:16.530 --> 01:20.040
Okay, so here we are in the local disk.

01:20.280 --> 01:21.210
PHP eight.

01:21.240 --> 01:23.190
Everything went fine.

01:23.250 --> 01:28.710
So since we are here let me find a PHP config file.

01:28.950 --> 01:38.370
Um, I'm not sure where it is and if we can find it, there should be a php ini file.

01:38.370 --> 01:43.800
If you can't find a file that has this name.

01:44.460 --> 01:50.490
Um, let's rename one of the present files, either development or production.

01:50.490 --> 01:55.200
Let's go with the development and rename it to just PHP ini.

01:58.650 --> 02:00.920
Yes, we would like to change the extension.

02:00.920 --> 02:02.450
Let's confirm now.

02:02.450 --> 02:07.100
Only do that if you didn't add a php ini file before.

02:07.340 --> 02:09.440
Next up, double click on it.

02:09.440 --> 02:14.810
It should open inside notepad or any other text editor you are using.

02:14.810 --> 02:17.840
And we just need to enable database support.

02:18.110 --> 02:21.410
So let's find something.

02:21.530 --> 02:24.020
And that's exactly what we need to find.

02:24.050 --> 02:26.660
Extension equals PDO.

02:27.770 --> 02:35.390
And here you need to uncomment the lines for the database drivers you'd like to use.

02:35.420 --> 02:38.450
We're going to be using SQLite throughout the course.

02:38.450 --> 02:40.400
That's why I need this line.

02:40.400 --> 02:44.330
And I need to remove this semicolon for MySQL.

02:44.360 --> 02:47.630
Uncomment this line for Postgres dot line.

02:47.630 --> 02:51.290
So you are just free to enable those extensions.

02:51.290 --> 02:59.540
When ready, save changes by going to File Save menu.

02:59.560 --> 03:02.050
And now we can close this file.

03:02.170 --> 03:05.950
And the next step is to tell windows about PHP.

03:06.100 --> 03:10.060
So go to the start menu and search for environment.

03:10.090 --> 03:13.810
It might have to be in your local language.

03:13.930 --> 03:16.330
You should see a window like this.

03:16.330 --> 03:21.100
So later on in this tutorial we've got this explained.

03:21.430 --> 03:24.820
And to jump here environment variables.

03:24.820 --> 03:25.540
There it is.

03:25.540 --> 03:29.230
Locate path and hit edit.

03:30.970 --> 03:31.780
Add a new entry.

03:31.810 --> 03:35.680
Now I asked you to remember where did you extract PHP.

03:35.680 --> 03:38.590
Because now we need to type this folder name.

03:39.550 --> 03:41.680
So that was my folder.

03:41.680 --> 03:43.420
And now I need to move it up.

03:43.990 --> 03:45.370
So it's at the top.

03:45.370 --> 03:49.480
And that's the way we tell windows about PHP.

03:49.720 --> 03:51.880
Finally hit okay right here.

03:51.880 --> 03:56.200
And then let's open PowerShell.

03:56.230 --> 04:01.040
And after everything we've done we should be able to type php hyphen v.

04:01.670 --> 04:11.000
If you see a problem like this that it is unable to load the specific extension, then just let's make

04:11.030 --> 04:14.270
sure we've got the right configuration.

04:14.600 --> 04:17.930
Uh, inside our php ini file.

04:17.960 --> 04:25.280
Let me just type extension and we need to locate the directory with extensions.

04:26.090 --> 04:26.630
Okay.

04:26.630 --> 04:32.240
Um, so it seems it's line 778.

04:32.240 --> 04:44.660
And we need to uncomment this line by removing the semicolon and then saving changes.

04:46.280 --> 04:48.650
We can close this file right now.

04:48.860 --> 04:53.060
Let's restart PowerShell just to be sure.

04:55.220 --> 04:55.490
Okay.

04:55.520 --> 05:03.090
So this setting change Omni had to be done if you encountered any issues inside the PowerShell terminal.

05:03.120 --> 05:09.240
If everything was fine and you've seen a message like this confirming PHP is installed and running,

05:09.270 --> 05:12.330
then it means that everything is fine.

05:12.390 --> 05:14.910
Okay, so that was about PHP.

05:14.940 --> 05:18.090
Next up, let's install composer.

05:18.120 --> 05:25.980
For that, let me just search composer, install inside Google and let me jump to this page.

05:25.980 --> 05:28.320
I'm gonna link this under this video.

05:28.410 --> 05:32.910
We need to run this installation program composer setup exe.

05:33.510 --> 05:39.720
Let's just start it confirm with yes and just hit next.

05:40.920 --> 05:44.520
So composer is a package manager for PHP.

05:44.550 --> 05:51.090
We don't need it at this very moment, but it will be useful later on in the course in the second half

05:51.090 --> 05:51.960
of the course.

05:51.960 --> 05:59.610
And after all those steps, you are now ready and you have PHP installed on your windows system.
