So now let's install PHP on windows.
I also have a tutorial for that on my website, so we're going to be going through it.
Now the first step is to download PHP.
I got the link right here.
You can just click.
And as I say right here, you should download a non-threat safe version and just aim for the most recent
one at the time you can find.
So for me that would be this one.
Let me download this zip file and after it finishes up, we're gonna have to extract this into some
kind of a folder.
Now it happens so that I already did that.
So I can grab a file I've previously downloaded.
Then you need to right click on it and find an Extract All option and select the folder where you want
PHP to go.
That's for example local disk.
It can be anywhere as long as you remember.
Where did you extract that?
Because it will be useful later on.
Let me count this folder.
PHP eight and just hit extract and just wait for it.
Okay, so here we are in the local disk.
PHP eight.
Everything went fine.
So since we are here let me find a PHP config file.
Um, I'm not sure where it is and if we can find it, there should be a php ini file.
If you can't find a file that has this name.
Um, let's rename one of the present files, either development or production.
Let's go with the development and rename it to just PHP ini.
Yes, we would like to change the extension.
Let's confirm now.
Only do that if you didn't add a php ini file before.
Next up, double click on it.
It should open inside notepad or any other text editor you are using.
And we just need to enable database support.
So let's find something.
And that's exactly what we need to find.
Extension equals PDO.
And here you need to uncomment the lines for the database drivers you'd like to use.
We're going to be using SQLite throughout the course.
That's why I need this line.
And I need to remove this semicolon for MySQL.
Uncomment this line for Postgres dot line.
So you are just free to enable those extensions.
When ready, save changes by going to File Save menu.
And now we can close this file.
And the next step is to tell windows about PHP.
So go to the start menu and search for environment.
It might have to be in your local language.
You should see a window like this.
So later on in this tutorial we've got this explained.
And to jump here environment variables.
There it is.
Locate path and hit edit.
Add a new entry.
Now I asked you to remember where did you extract PHP.
Because now we need to type this folder name.
So that was my folder.
And now I need to move it up.
So it's at the top.
And that's the way we tell windows about PHP.
Finally hit okay right here.
And then let's open PowerShell.
And after everything we've done we should be able to type php hyphen v.
If you see a problem like this that it is unable to load the specific extension, then just let's make
sure we've got the right configuration.
Uh, inside our php ini file.
Let me just type extension and we need to locate the directory with extensions.
Okay.
Um, so it seems it's line 778.
And we need to uncomment this line by removing the semicolon and then saving changes.
We can close this file right now.
Let's restart PowerShell just to be sure.
Okay.
So this setting change Omni had to be done if you encountered any issues inside the PowerShell terminal.
If everything was fine and you've seen a message like this confirming PHP is installed and running,
then it means that everything is fine.
Okay, so that was about PHP.
Next up, let's install composer.
For that, let me just search composer, install inside Google and let me jump to this page.
I'm gonna link this under this video.
We need to run this installation program composer setup exe.
Let's just start it confirm with yes and just hit next.
So composer is a package manager for PHP.
We don't need it at this very moment, but it will be useful later on in the course in the second half
of the course.
And after all those steps, you are now ready and you have PHP installed on your windows system.