Setup On Mac

11 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€94.10
List Price:  €131.75
You save:  €37.64
£77.97
List Price:  £109.16
You save:  £31.19
CA$139.59
List Price:  CA$195.43
You save:  CA$55.84
A$152.81
List Price:  A$213.94
You save:  A$61.13
S$133.81
List Price:  S$187.35
You save:  S$53.53
HK$777.87
List Price:  HK$1,089.05
You save:  HK$311.18
CHF 88.25
List Price:  CHF 123.55
You save:  CHF 35.30
NOK kr1,105.40
List Price:  NOK kr1,547.61
You save:  NOK kr442.20
DKK kr701.91
List Price:  DKK kr982.70
You save:  DKK kr280.79
NZ$168.16
List Price:  NZ$235.43
You save:  NZ$67.27
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.91
৳11,965.03
List Price:  ৳16,751.52
You save:  ৳4,786.49
₹8,438.50
List Price:  ₹11,814.24
You save:  ₹3,375.73
RM443.70
List Price:  RM621.20
You save:  RM177.50
₦167,914.20
List Price:  ₦235,086.60
You save:  ₦67,172.40
₨27,820.24
List Price:  ₨38,949.45
You save:  ₨11,129.21
฿3,479.40
List Price:  ฿4,871.30
You save:  ฿1,391.90
₺3,438.07
List Price:  ₺4,813.44
You save:  ₺1,375.36
B$575.47
List Price:  B$805.68
You save:  B$230.21
R1,807.17
List Price:  R2,530.11
You save:  R722.94
Лв183.84
List Price:  Лв257.39
You save:  Лв73.54
₩140,765.83
List Price:  ₩197,077.80
You save:  ₩56,311.96
₪375.06
List Price:  ₪525.10
You save:  ₪150.04
₱5,861.60
List Price:  ₱8,206.47
You save:  ₱2,344.87
¥15,409.04
List Price:  ¥21,573.27
You save:  ¥6,164.23
MX$2,045.29
List Price:  MX$2,863.49
You save:  MX$818.20
QR364.92
List Price:  QR510.90
You save:  QR145.98
P1,347.64
List Price:  P1,886.76
You save:  P539.11
KSh12,911.70
List Price:  KSh18,076.90
You save:  KSh5,165.20
E£4,921.87
List Price:  E£6,890.82
You save:  E£1,968.94
ብር12,340.83
List Price:  ብር17,277.65
You save:  ብር4,936.82
Kz91,125.91
List Price:  Kz127,579.93
You save:  Kz36,454.01
CLP$96,906.30
List Price:  CLP$135,672.70
You save:  CLP$38,766.40
CN¥723.42
List Price:  CN¥1,012.82
You save:  CN¥289.40
RD$6,049.41
List Price:  RD$8,469.42
You save:  RD$2,420
DA13,340.47
List Price:  DA18,677.19
You save:  DA5,336.72
FJ$226.02
List Price:  FJ$316.44
You save:  FJ$90.41
Q773.94
List Price:  Q1,083.55
You save:  Q309.60
GY$20,947.72
List Price:  GY$29,327.65
You save:  GY$8,379.92
ISK kr13,916.60
List Price:  ISK kr19,483.80
You save:  ISK kr5,567.20
DH993.43
List Price:  DH1,390.84
You save:  DH397.41
L1,799.36
List Price:  L2,519.17
You save:  L719.81
ден5,784.17
List Price:  ден8,098.07
You save:  ден2,313.90
MOP$801.80
List Price:  MOP$1,122.56
You save:  MOP$320.75
N$1,785.27
List Price:  N$2,499.45
You save:  N$714.18
C$3,680.37
List Price:  C$5,152.66
You save:  C$1,472.29
रु13,514.93
List Price:  रु18,921.44
You save:  रु5,406.51
S/377.01
List Price:  S/527.83
You save:  S/150.82
K402.10
List Price:  K562.96
You save:  K160.85
SAR375.63
List Price:  SAR525.89
You save:  SAR150.26
ZK2,720.99
List Price:  ZK3,809.49
You save:  ZK1,088.50
L468.27
List Price:  L655.60
You save:  L187.32
Kč2,387.60
List Price:  Kč3,342.73
You save:  Kč955.13
Ft38,566.64
List Price:  Ft53,994.84
You save:  Ft15,428.20
SEK kr1,088.61
List Price:  SEK kr1,524.10
You save:  SEK kr435.49
ARS$99,837.19
List Price:  ARS$139,776.06
You save:  ARS$39,938.87
Bs694.40
List Price:  Bs972.19
You save:  Bs277.79
COP$437,433.09
List Price:  COP$612,423.82
You save:  COP$174,990.73
₡51,281.98
List Price:  ₡71,796.82
You save:  ₡20,514.84
L2,526.99
List Price:  L3,537.89
You save:  L1,010.89
₲782,424.02
List Price:  ₲1,095,424.93
You save:  ₲313,000.91
$U4,216.01
List Price:  $U5,902.59
You save:  $U1,686.57
zł410.18
List Price:  zł574.28
You save:  zł164.09
Already have an account? Log In

Transcript

Hello, in this video, I am going to show you how to set up PHP or you know, get a an environment setup. So you can develop a PHP on a Mac, if you're interested in Linux windows, feel free to check out those videos which I have as well. So on Mac for PHP, there are several different ways to go about it. You know, in fact, you can whip up a server using the terminal without actually even installing anything. But for more advanced features like databases, and just general extra features or, you know, just generals or as a bad debugging, and bear control out and store some sort of external server. And the one we're going to use is x, which is a cross platform, Apache, my SQL, PHP and Perl server manifested in the Perl side.

We're only interested in the Apache which is the server itself, my SQL, which we'll be using later on, you know, for databases and PHP, which is well the language Okay, so there's two things You need to download. And the first one is example it will need Google exam. And I'll provide a link to everything they need anyway. So let's go to Mac, download whatever the latest version is. and install downloading on a can select the word go download it. Next, what you want is a text editor or some sort of, you know, Id where you're going to be, you know, developing your website, and I'm choosing brackets because not only is it free, it is heavily supported.

Well, it's made by Adobe, the, you know, the Photoshop, Premiere Pro, Adobe, and heavily supported by them. They want it's open source, as well, the law plugin works very lean very well, you can use something else, that's fine. So this is an optional step. If you have no Tech Data, feel free to use that. So I'm gonna, you know, click download and click cancel because I've already got it. So that's the reason enough on canceling the download.

We will need chrome later on. Let me just Close chrome down for the moment. And now what you want to do is basically install both of these. So if I open up exam, the dmg for double click that. Okay, there we go. And literally, you want to drag that into the application folder, I've already got in there on a click Replace your copied over shantay long.

Next, you want to install brackets. So can just open that up, drop on to application folder, and current copy bracket replace, obviously, because I've already got so hence why it's saying replace otherwise for you, it will be well, you know, you'll just stop copying. So once this is done, this is technically everything installed that we need. And we'll just need to run the server and I'll show you where your files will go. But we'll get onto that in a moment. This is almost done a few more seconds.

Okay, so what we can do is each check these two we don't need these anymore. And now what we are going to do is first of all, open XM so go to applications and go to XML right here. You know the exam folder from a slightly older installation, you may or may not have that so you know, just ignore that I just follow the steps as I'm showing you. So click on Start the full stop server. It's just already mean you know, it's in the process of start in what is green. That means it has successfully started it and shouldn't take long pilot 1020 seconds max do just waiting for the server to start.

Okay, so it is still going still in the process of starting the server. And okay, that's all done that we have this IP address, which I will explain in a second what it is go to services, and you want to start these services up, they should automatically start from once you've started the server, did you not just click Start all and now basically just start. So really the only two that we mainly need Apache for PHP, my SQL is for stuff like databases and pro FTP, D free, no file, transfer stuff. And network. We're going to get onto that in a second. So now the server is actually all started.

And if we go to our web browser window, let me open this up. If you copy this link right here, and paste it in there, click enter. This opens up and if I show you something If I go back to exam, I click stop. And I try and you know, load this URL up, it will not work anymore. And that is because the server has been shut down. So this is where the server so if I click Start again and just start it again just patiently for it to start.

Okay, still waiting. I'm not gonna shut it down again, I should be able to show you everything else I want to show you in this video without having to shut it down. Okay, so the fact is loaded means the dat port and server has started and it will go green in a moment. Now, this IP address may be different. So I mean, and not just on your computer, to mine, I mean, you know, your computer and then maybe few did they tell you You try again, this IP address may have been allocated something else I might be different. So we want a more elegant solution.

So let's install these as Wow. They should go green and normal now. So instead, we want to be able to open it up with this URL, so localhost, so know cool. Post colon 8080. At the moment, that doesn't work. If I click Enable, for you know, that one, it works now, that basically takes us to the same place.

So what is this dashboard all about then? So this is not the built in thing. You can go to PHP myadmin where your databases are, which we'll be covering later in this series, go to PHP info, which will basically shows all information about our PHP server like version, you know, different supported features, etc. And so we're on version 7.3 point seven, which is cool. And now, what we want to do is, you know, where is all our code? So if you go to volumes go to men and That will have mounted it wrong.

Yeah, I opened that up. And what we are interested in is in the ht docs, this is basically where all of our files are. So when we first go to the website like the server like that, it goes in looks for you know, the follow that you specified. If you don't specify a file, it looks the index dot HTML or dot php page, which dot php. And in here, I open this up with brackets. Click Open to so you may look slightly different depending on what sort of color you are using.

I mean, what sort of scenes is likely you can go to, you know, all sorts of stuff that you can change in here like for your preference preferences, you can change the font to the you know, dark theme, you might look slightly different, all of that stuff. So if I go back to index dot php, this is basically just doing a redirect to dashboard, which is this right here, which is this is basically this page. And if I was to essentially let me show you the file, rename this to the chevron for them anything that's not index, and I find out through it, it will just list at the folder because it cannot find a default file, which is what the index of PHP so for the purpose of this series, we're gonna have a folder called tutorial. And we are going to say, tutorial. And there we go.

That folder is now there. So what we're going to do is opening up with brackets, I'll click do File, Open Folder. And then from here, I want to go to Okay, so I'm gonna drag it on into the log on quadriga Ht doc so we can literally everything so hasty docks is open, and then in tutorial, and we can right click, go to new file, type in index dot php. And I'll explain all of this other later date, what is echo stir, and I'm going to put hello world. Save that, and I did accidentally close it as well. But now why go to that it picks up the file and it has not picked it up because I forgot all about these tags.

Hence why we will not get any syntax highlighting now for reloaded. It just prints out hello world, but then I'll explain all that stuff at a later date and apart from that, we're all done. We are all set up to For PHP, one thing, another thing to bear in mind is once you are done, just click on man just go to disable, and you know, stop all this actually all what you can do is click stop. And that will literally shut down the volume, it will turn off the network, still saying those active burnings he won't work but you'll just be active again, you know, when we Next go into it, and services should be shut down the overall server has been shut down as well. And actually, I'm not gonna show you in here. But another thing that you can do once you click stop, and it's loaded, if you go to go to application that will essentially just load up the website.

So if you are having some trouble trouble, you know, going to the the URL via I mean the website via the IP address, or via the local host address, then you can literally just go to go to application and that is it for this video. Any questions? Feel free to shoot me a message, Alex said. You can use any any text editor editor you want. I'm going to be using brackets because I think is a fantastic IE a lot of each of the word plugins really fast free, and it's open source, and it's available on virtually every platform. So thanks for watching.

Look forward to seeing you in the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.