I will call you back again to another lecture in PHP.
And in this video lecture we go ahead and look at how to set up PHP on our computers.
So as a beginner, I believe you.
Maybe you don't have PHP on your computer.
What if you have PHP already set up with any local server?
You can actually continue with that.
But if you want to join me and set up this, there is no problem.
We can go ahead and do that together.
But for absolute beginners who do not have PHP already set up on their computers, this is actually
for you.
Now let's go ahead and move on step by step.
We are on the official page of PHP php.net.
So go to your browser and type in Php.net and you are going to come to this page.
And once you get to this page, you move straight and hit on downloads.
And once you hit on downloads, you are going to get to this awesome page.
And from this page you can see we have current PHP and that is 0.30.01.
And we have old stable PHP.
And this is another old stable PHP.
So any time you're downloading this ensure you download the current stable PHP.
The version might have changed depending on the time you are taking this lecture, but it doesn't matter.
What matters most is that you're actually going to download the latest version, the current stable
PHP at the time of taking this course.
So now at the time of making this video, it is a this was actually released on August 29th, 2024.
This might have actually changed by the time you are also taking this course.
That doesn't matter.
It means that it's been upgraded and that would be much safer.
Now I am using windows PC and I have windows download actually pop up right in here.
So PHP actually dictates the, uh, your operating system and the to actually give you what you need.
Now go ahead and hit on windows download if you are using windows PC and I'm using 64 bit system and
whatever I'm going to get here is about 64 bit system.
So you can check the one you are using.
If you are using 34 bit, you're going to see maybe 32 bit.
I mean, if you are using 32 bit system and not that four bit system.
So if you are using 32 bit system, you go ahead and then load the thread safe.
So if you're using 64 you also download thread safe.
So I will not be using the non thread safe version for this because this is more secure than this.
If you look at the zip file, the zip file is a 30.67 MB for non thread safe, and for the thread safe
we have a 30.81 MB for the thread safe.
So if you're using a windows PC and this is 64 bits, you got a hit on downloads and hit on the zip
file.
And once you click on the zip file it will actually download this.
So once it downloads you can see right in here I have this actually downloaded the two minutes ago.
The reason why I did this 30 minutes ago was because I don't want this to waste time downloading for
us, so it's actually downloaded a fresh because I downloaded this just 30 minutes ago.
Now let's go ahead and hit on this.
And uh, once you click on that, you have this right in here.
So this is the download page.
And I have this zip file actually here.
All right.
So what I need to do right now is I'll go ahead and extract whatever that I have downloaded.
This is PHP 0.30.11.
And this is 64 bit.
I'm going to keep this on the root directory of my website or of my computer.
Now let's go ahead and right click on these and go ahead and hit on Extract All.
And it's good to give you a pass where this is going to be structured.
It actually wants to extract this to the download page.
But I want this to go to the root directory of my computer.
What I need to do is that I'll go ahead and hit on browse.
I'll go ahead.
I hit on PC, I'll go over and select the look at this.
I'll go ahead and select this.
Now I have C and a colon backslash.
Now if I should be able to extract everything here that it has so many files right in there.
So I need to input all this file inside a folder.
So I'm going to name that folder to be PSP.
All right.
So this folder is actually the PSP.
I've just written this.
So go ahead and add PSP so that everything we're going to extract will be right inside this folder.
Now if you have done that you go ahead and hit on extract.
And once you hit he's on extract, they should begin to extract everything that is in this zip file
for you.
And it has done extracting and actually pop up this folder for us.
Now if you go ahead and hit on your local disk, you can see the PHP which we just created is right
in here.
So if you check that you can see that everything is here.
Now the next thing I want to do, which I've actually done because of PHP and I'll be using these and
I'm going to take you step by step on what to do is you're going to check on the environment variable
of your computer to actually add this path to your environment variable.
Now we're going to do is because I'm using PC.
So I have to actually go ahead and type on this.
So you go over to your computer and I'll go over here and I'm going to type in environment.
Yes.
And what's the type environment there.
It's actually come out.
So it did system environment variables.
So I'll go ahead and hit on this.
And I'm going to drag this right in here.
And what I'm going to do right now is I'm going to hit on environment variables.
And uh you can see your paths.
All right.
So what I'm going to do now is I'll go ahead and hit on edit.
So inside here I have this part called uh c colon backward slash PHP.
Now if you are new because you don't have this go ahead I hit on a date and you're going to see this.
You go ahead and add this path to your own.
So once you add this path is actually telling PHP anytime you're running it that is going to follow
this path and execute whatever that you have.
And whenever you finish, you go ahead and click okay and uh, click okay.
And you actually go ahead and apply because that is what you need to do and are to get PHP set up on
your computer.
The next thing I'll go ahead and click okay and that is gone.
So the next thing I'm going to do to ensure that that part is actually discoverable and the PHP can
actually discover that part is I'll go to my computer and type cmd.
And once I type cmd and hit on this drug this right in here.
And if I want to check if PHP is there, what I'm going to do is I'll go ahead and uh, hit on p h p.
So to check on PHP, I'll go ahead and uh, first of all check the part and then check if the PHP is
there for me to check the part.
I'll go ahead and type equal and put percentage uh, parts and plus the percentage and then go ahead
and hit enter.
And it's going to pop out every part of your computer.
And you can see the last one I added, which I have already added before on my system is a C colon backslash
PHP, and it shows that PHP is actually on a computer, so that is good.
Now if I want to check the version of the PHP which we just inputted right now, what I'm going to do
is say p p and uh, give a space minus v and hit enter.
And you can see I have PHP 8.30.11, because this is a stable version that we have.
And right now we have PHP installed and set up on our computer.
So bravo.
And that is really so good.
All right.
So the next thing we're going to do right now is in the next video lecture, we are going to start PHP
and we're going to set up and start running PHP on our computers.
And that is going to be very cool and it's going to be very amazing.
So thank you so much.
And I'm going to see you in the next video lecture.