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
€95.97
List Price:  €134.37
You save:  €38.39
£79.79
List Price:  £111.71
You save:  £31.92
CA$140.31
List Price:  CA$196.44
You save:  CA$56.13
A$153.75
List Price:  A$215.26
You save:  A$61.51
S$134.64
List Price:  S$188.51
You save:  S$53.86
HK$778.36
List Price:  HK$1,089.74
You save:  HK$311.37
CHF 89.34
List Price:  CHF 125.09
You save:  CHF 35.74
NOK kr1,107.14
List Price:  NOK kr1,550.05
You save:  NOK kr442.90
DKK kr715.75
List Price:  DKK kr1,002.09
You save:  DKK kr286.33
NZ$171.37
List Price:  NZ$239.93
You save:  NZ$68.55
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.92
৳11,945.63
List Price:  ৳16,724.36
You save:  ৳4,778.73
₹8,442.99
List Price:  ₹11,820.52
You save:  ₹3,377.53
RM446.75
List Price:  RM625.47
You save:  RM178.72
₦169,271.38
List Price:  ₦236,986.70
You save:  ₦67,715.32
₨27,777.22
List Price:  ₨38,889.22
You save:  ₨11,112
฿3,446.26
List Price:  ฿4,824.91
You save:  ฿1,378.64
₺3,454.90
List Price:  ₺4,837
You save:  ₺1,382.10
B$580.04
List Price:  B$812.08
You save:  B$232.04
R1,815.38
List Price:  R2,541.61
You save:  R726.22
Лв187.66
List Price:  Лв262.73
You save:  Лв75.07
₩140,436.95
List Price:  ₩196,617.35
You save:  ₩56,180.40
₪371.46
List Price:  ₪520.07
You save:  ₪148.60
₱5,893.31
List Price:  ₱8,250.87
You save:  ₱2,357.56
¥15,475.45
List Price:  ¥21,666.25
You save:  ¥6,190.80
MX$2,042.64
List Price:  MX$2,859.78
You save:  MX$817.14
QR364.56
List Price:  QR510.41
You save:  QR145.84
P1,367.06
List Price:  P1,913.94
You save:  P546.88
KSh12,945.58
List Price:  KSh18,124.33
You save:  KSh5,178.75
E£4,964.52
List Price:  E£6,950.52
You save:  E£1,986
ብር12,237.67
List Price:  ብር17,133.23
You save:  ብር4,895.55
Kz91,290.87
List Price:  Kz127,810.87
You save:  Kz36,520
CLP$97,782.75
List Price:  CLP$136,899.76
You save:  CLP$39,117.01
CN¥724.22
List Price:  CN¥1,013.94
You save:  CN¥289.72
RD$6,024.63
List Price:  RD$8,434.73
You save:  RD$2,410.09
DA13,426.15
List Price:  DA18,797.15
You save:  DA5,371
FJ$227.57
List Price:  FJ$318.61
You save:  FJ$91.03
Q771.64
List Price:  Q1,080.33
You save:  Q308.69
GY$20,913.50
List Price:  GY$29,279.73
You save:  GY$8,366.23
ISK kr13,962.80
List Price:  ISK kr19,548.48
You save:  ISK kr5,585.67
DH1,005.63
List Price:  DH1,407.93
You save:  DH402.29
L1,821.98
List Price:  L2,550.85
You save:  L728.86
ден5,904.20
List Price:  ден8,266.12
You save:  ден2,361.91
MOP$801.48
List Price:  MOP$1,122.11
You save:  MOP$320.62
N$1,812.81
List Price:  N$2,538.01
You save:  N$725.20
C$3,678.31
List Price:  C$5,149.78
You save:  C$1,471.47
रु13,500.25
List Price:  रु18,900.90
You save:  रु5,400.64
S/379.05
List Price:  S/530.69
You save:  S/151.63
K402.47
List Price:  K563.48
You save:  K161
SAR375.40
List Price:  SAR525.58
You save:  SAR150.17
ZK2,764.29
List Price:  ZK3,870.12
You save:  ZK1,105.82
L477.77
List Price:  L668.90
You save:  L191.12
Kč2,432.37
List Price:  Kč3,405.42
You save:  Kč973.04
Ft39,496.05
List Price:  Ft55,296.05
You save:  Ft15,800
SEK kr1,103.50
List Price:  SEK kr1,544.95
You save:  SEK kr441.44
ARS$100,363.46
List Price:  ARS$140,512.86
You save:  ARS$40,149.40
Bs690.75
List Price:  Bs967.07
You save:  Bs276.32
COP$438,931.09
List Price:  COP$614,521.09
You save:  COP$175,589.99
₡50,918.63
List Price:  ₡71,288.12
You save:  ₡20,369.49
L2,526.16
List Price:  L3,536.73
You save:  L1,010.56
₲780,388.98
List Price:  ₲1,092,575.79
You save:  ₲312,186.81
$U4,261.82
List Price:  $U5,966.72
You save:  $U1,704.90
zł416.31
List Price:  zł582.85
You save:  zł166.54
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.