Introduction to XAMPP control panel and how to run backend PHP code using XAMPP.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello class i hope you all are fine this is a series of tutorials uh how to use xam or install exam or digital studio code this is the third one well i'll explain the exam control panel and how to run php code in your server so without further ado let's start if you have been following my last tutorial you probably know that i already have installed uh them on um on my c drive now as you can see i have three of them this is the last one i've done on my videos uh so here you need to be familiar with this uh folder obviously you can see i have multiple versions for your case you might be only one let's have a look since i made it new for you on this folder you'll see a lot of applications that helps the launch together to facilitate you the localhost server now some of them are very important such as php itself the so it has a php folder where you can find the php related um you know the files so in down below here one of the file is very important is called php ini now this is a configuration file you will also see two other php one called php ini development php ini production now we're not going to touch any of these things good to know which one is configuration by looking at the type now sometime now and then you have to go in there and change things add things it's a very messy file it's going to quickly go through this first before i go to the control panel thing just to familiar with this application a little bit so let's open it up with the code editor and see what is it it's a configuration file just like any other application but it has a lot of things in here most of the things you see are green that's because it's commented out the way you commented out you using a semicolon at the beginning of the line let's say i want to change something let's find out something let's say i want to find smtp server so probably somebody gave me a smtp server which i want to add to this file in order to send email and i can just search ctrl f ctrl f to find and you just paste a type it clicks straight to you you can see my smtp server for is now 25. however if i want to change it i can say okay my company hosting company gave me this i can put it there and i have to save it this is it if you of course it's better not to change anything without knowing it since it's very sensitive file it contain all of your setup for php to run smoothly however let's say i do not want a smtp port to be activated all i have to do put a semicolon before it is turned off so this is how you you turn off or comment out things you can also find different things like open open ssl maybe yeah or an ssl if you want to configure security so a lot of things goes in here with the due time we'll come back to now and then we'll come back to here we'll make changes if necessary file ups loading capacity what not a lot of extensions that you can enable disable here so this is a this is a very sensitive page uh we'll only do change what we know and once you say video you have to reboot your system uh no system this control panel then control panel in order to activate those features anyway so this is a very rundown of php in our file you know where it looks let's move on to any other file let's go to mysql now inside this mysql this is where the mysql server lives and your data leaks and here you have a folder called data you can take a copy of it in case you need a manual backup however i will also show you the gui way to back it back it up just to familiarize with these things this is another important uh piece of tool that comes with them not with any other it's called send mail you can use these configure these in order to send an email from the localhost you know sending email from local which is not easy job most of your hosting company will reject it thinking that this is a spam because it's coming from a local host so you cannot send an email from localhost what we do we configure localhost and email info such a way we add our live hosting ports so from local hoses go straight to our live posting like one dot com or somewhere they give you fold you set that up using that we can send email to everybody it may not work for many of you but ninety percent ninety five percent who works so these are the few applications i want to introduce you of course your main web server apache lives in here so these are there are plenty other things i'm not going to go through all of them paul what not php main environment but one key place is where our application link is called htdocs folders now this is same for live server and new so do not forget that you can also you know get a copy of this okay now this is where we will be creating our projects every project we have different names this is like a domain name so this is where our project lives we'll come back to that in a minute and so yeah and where's the control panel by the way scroll all the way down you'll see some pink color uh icon uh exam start then stop i'm gonna use them i'm gonna use this now you can double click on it and open it however because you'll be frequently using it i will highly recommend to create a shortcut on your desktop to create a shortcut just right click on it to send to and create a shortcut for mac you can just do your way the way you feel shortcut so let's see if i have created yes i have created a shortcut here i'm going to start that and it started now let's have a look whether it is working now time for the truth so i need to start apache in order to execute my php scripts or server side scripts let's see if this works so it's going to go to try to start and as you can started the green and it is connected on port 80 now port 80 is the default port for your web browsers where the communication happen and that is dedicated for uh this feature you also have another one called 443 these are default now what is the port by the way these are not physical probes these are connection point of logical connection point if you think of the port you can think the usb port usb port um so you have different other ports physical ports that connects to your you know audio jacks and these and that hdmi cable those are physical but the software the way they can connect with another computer through are called virtual or they're like non-visible for there they're like a channel between different connection for example for web it is a t mysql it is something let's start see what port is connecting it's going to connect 3306 for number that's the default so for each of this connection computer producer default has a default port number in case that port is occupied by somebody else as i mentioned earlier when you install them you might have skype on messenger installed which will occupy this because many of the zoom whatsapp and skype also can run on a web browser that is the reason they also try to occupy this code if that is the case you end up with saying apache cannot start fold is occupied how to fix that there is a fantastic tutorial on uh stack overflow after this probably i will try to go through this little bit it's not going to happen to all of you but if it is happening so fast you shouldn't have the problem and how to fix it i'm gonna iterate that okay now we do not need mysql at the moment of our stage of a tutorial but i'm just gonna try whether it's working or not these three i'm not going to use them so i'm gonna leave them the way it is okay now i have this control panel i just can click on admin to see my server let's fire this administration when i fire it it goes straight to localhost dashboard now this dashboard is a default system for a server it gives you nice interface to go to different places it also tells you different applications restaurants it's good for overview it tells you um what is happening with version of xampp you're running remember zamp is a package that combined apache web server mariadb another name this is the official name of mysql those who doesn't know call my adidas then you have php and this is another language we do not use it now right now but those who still use it they can use it it comes with a handy tool like phpmyadmin i can just click on that i can go to my database server so this is the interface of my database server which i will be going to later on okay i go back so here from here this dashboard you can go different places you can check the application list of application you can see the php info the information about the php details very important that you can see find out different things you can also do control f let's say i want to see my sq sql information i can just keep pressing and i can see ah this is this has a support you can see a lot of things these are very technical you may not understand all of them and nobody does so just to see if you need to organization this is like a representation of your php ini file in a graphical mode very helpful why did i find it very simple you can click on php info uh it has it so this dashboard helps you to start you know give you a glimpse but where is my project now let's have a look let's create a project so to create a project i'm just going to quickly go over to another application and grab a file from there from my previous but i'm just gonna grab a an application that i have called animal kingdom i'm just gonna put it there it's pretty much same thing so where can i make my application it goes in http folder so let's say i want to make a new folder i'm just going to call it my project my underscore project because i'm running out of names so when you give a name make sure that it is all a small letter there is no space between two words and use underscore not minus this is how the domain name system works and the domain name in a gonna see a minus that is not allowed in a domain name you can have subdirectory dash and this but no domain name so try to keep it uh one letter if you have multiple words put the underscore in between so here you can create your project now earlier you saw you had a dashboard launched that's the default so don't disturb me leave it there do not have to do anything i can go to my project now so i can just get rid of the dashboard and say my underscore project it could be any you can put any amount of project there not a problem this is empty at the moment i do not have anything this is my new project however i have copied a a a another project as you can see this is called animal kingdom that is from my another example i just got it let's say this is my project and i have a lot of files here to give you a quick idea what is going on this is my another project of course i had this empty project into anything there just a animal kingdom you can create as many projective one all i have to know if i have to change it to these if i want to project to this all you have to do just write the project name say animal kingdom okay let's see yes my application is running but you can see there is a little problem with the connection it's saying you need to connect with my sql database which i did not i did not because i just copied it straight away i have a database running under these but that not been set up because we just installed xm3 latest so we need to configure that but you can tell this is running and a warning sign is telling you this is good this is what i expected because i know i have a database i haven't connected it yet so it is running my application is running good fine but what about my project things uh just assume my project is still there my underscore project okay so this is gonna have a new project for now okay so let's do things now i have started from here by clicking admin you can just type it get used to it it will be easy just type local host and then forward slash and semi project it will be there you cannot run any of this file directly from from the server like for example php scripts will not run any file if you double click on it it's not going to run if you try to run it let's try to run it with remember that you cannot run it with chrome like this it's going to give up all the information away it's meant to run to the server writing local host and forward slash and by clicking on those files so we'll come to this in a minute so that's my htdoc video project admin you want i have a my project i haven't done anything yet so i can also go clicking here or clicking typing localhost i can also go to mysql database just like this like in admin so i hope you get familiar with it very soon so that's pretty much it is i do not want to do any much uh changes on my [Music] uh control panel leave it the way it is you can close it if you close this it's not gonna close it's gonna stain it it's staying here tray here just right tray little chip the reason that i do not want to occupy my trade too many things like this i closed it it did not close if you look at that uh let me see if i can show you it is running here i have in fact two of them running one running so here if i click right click on it you can see these are running i can quit from here i can say oh now show me i can stop it again so that's so about the port issue i will go through later on if you have that problem they say oh apache is not running because your port is software what can be done i'll go through this later on so this is your control panel and you have made your files and it's cool let's create a file quickly so i go to my http this is my new project now i have visual studio code so i can right click on it open with code remember i said during installation of visual studio code there are some tick boxes if you have ticked those boxes you will see this beautiful feature you can open any project by right clicking on it and open with code bear in mind this is not available in mac only on windows mac you still have to open the visual studio code first then open the folder so i'm going to show you both the way but the best way to do it is this just fire it up it's going to open up it's going to open up entire environment for you yes i do test i do trust i have a welcome window leave it there my project i have nothing in here i have no files in here i'm gonna create some files so this is one way to open them just right click and open it okay another way you can open it is let's say i'm gonna open the visual studio code manually i have a shortcut on my desktop and i'm gonna say hello i'm gonna open it from open folder uh so i'm gonna go to here my project i'm gonna open it okay it is already open as you can see because when you open something last time it is there so both way you can open it okay let's move on guys if you have problem uh following please review the video this should do the job let's open it up create some tiny files in here so one of the files i want to create is called in here i'm just gonna right click and open file look where i'm clicking here or you can just click on here now i'm going to create a two files one is called on a html actually i'm not gonna create any html i think we have done that live server thing last class uh last video so i'm just gonna create psp scripts i'm gonna say test just test dot php i'm not going to create any index that's because i want to show you what happened if you do not have an index let's have a look and here i'm going to quickly add a little bit of php script so the way i do php is very simple you just type php make sure anything that you put in between this if you want to put anything in php just put it there so here i'm just going to say echo echo is a pinch uh hello world or firmness hello world okay it's been saved fine let's fire it up on the browser here if i refresh this my project i should be able to see chess.php now if i had a index.php it will straight go to the index.php because the server are configured such a way that if you play index.php index.html index.asp pick up that as a default because i don't have it it's gonna expose all of my files now this is called directory browsing in a real environment you should stop people to see all of your files in the future we will teach you how to do those but for now let's fire it up let's see so what happened if i just run this file on the browser just like this open with google chrome i was hoping this is gonna run nope it gave you the information so you cannot run like this you can double click on run id the way to run it is this you write localhost it goes to your server and then pick up the project and you can see it now click on it and you go hello world so it's working my php is perfectly working so that's pretty much how they use your php and you can continue developing many other things with it uh i will have a lot of other things for example if i want to write a php i want to see more about php that i installed you can just type php info built in function and if i just go ahead and say hello refresh it um i'll be able to see the whole php information that you saw earlier it's good okay so what will happen if i have index file here let's go and create a index.php dot php now this is index so i'm just gonna throw some a boilerplate code i'm gonna say welcome to my project or my my site just for fun here i'm going to create a little bit of php script php do the same thing hello world echo i'm gonna say welcome to my project welcome to sorry to my project okay let's see what it does so now that i have two files index see what it fires when i go here and just type again localhost forward slash my project i just typed it straight away on the index.php you do not see that index.php but it is the same index dot piece we can type to double confirm it there you go this is the same thing so if you have an index.php file in your project it's gonna fire up automatically it's not gonna show up all the files so i hope you understand this okay now here you can do a lot more things with the php but obviously the objective of this to teach you how to run uh exam control panel how to make a shortcut of it and where your actual project live so as you can see we placed in the htdocs all your projects i have another project i want to open i can open it and i can try it but we're going to go to this later on so you could have multiple projects here and at the moment i have one project as you can see animal kingdom i have but i do not have the database connectivity uh it doesn't work so if i want to fix it i have to create a table and all this thing this is something we're going to cover later so my configuration file here suggests i should have a database namely this which i do not have because i just installed it so i need to configure those things i need to create a database in my phpmyadmin and then this will work this site will work so obviously if you want to know about this we'll go through this later on but now i'll run a basic php script okay while i'm here i'm just gonna quickly go through one more thing with you guys is what happens when you try to start apache and it tells you the port is occupied now this is quite annoying and if apache doesn't start nothing will work as simple as that should you fix those problems what i do i go to i do not go to my teacher and ask him all the questions i just use google how to fix a whole problem with them for apache okay let's search it now it tells me a lot of different different things i can go there it has a nice tutorial but i tend to go for something much more subtle which i like it's called a stake overflow and this is what i like because they they really helpful i'm gonna open that of course i have nice videos here i can watch all over the places sometime it might get even complex to begin with so i prefer this here is nicely tells you the screenshot how lovely these people are you see the one is the green that's the most suggested one and you can see this how he's saying he said hey if you want a different port for 80 is occupied follow do the follow follow the uh these steps so now the port 80 is occupied he said to click on network net set application on my control panel to see which port my which application has been taken my for 18 so let's have a look now that it is working you're not going to see this problem but let's have a look i click on add state and the first one is 480 for your web browser remember this port can be occupied by any of your web-based messenger system so if they might then you might see what's up here you might see zoom here but luckily for us it's hdpd httpd is something that we are looking for so it's perfect for me i don't have any problem but if you see something else you probably either have to kill that application or stop that application somewhere before you install it so it can occupy itself or you can change the port now you can assign yourself support different port for this 80 instead of 80 for my apache to connect now how can i do that okay i've seen this is good but if it wasn't good it was a different application this is program id this is the name of the application then i will have to if it is other than httpd you have to make sure that you either assign a new port for your http http is like a hypertext anything good let's close it now what else it says yes my case is fine but your case is not that case in case that is a system or something we can choose a free port number in this case 80 full so this remains saying to add a new port edit following files so you can go to them apache config folder and and then find out this file to configure it let's have a look let's say let's imagine i have problem of the ports i go here i have apache i have config here is a file called httpd this is whatever you wanted i'm going to open it and you see hundreds of things in here just like your php ini files now all i have to do change to two things in here so what i'm going to do i'm going to follow this it says please change uh these sections to 8012 and this section both of them so let's copy this let's see if i can find the ocean of a lot of things i just control f and i paste it and it's found it so here i can add my new poll so that's one thing done and i need to also change it to the server name where it going to copy this i'm just going to go here and just paste it and i'm going to change it here too so that now newport will be 8 0 1 2. now my one is perfectly working i didn't have to change it but i've changed it so let's keep it away so this this link will be there but as i said please do a search before you can every solution is almost available in a state of workforce everything just give yourself a go it's good to learn you and you know it's good to do your own search and analytical skills so when you're out there job your boss not going to come and tell you you know everything i'll teach you you would find a way to do these things we have learned that way many cases but as i said you don't have to remember all of these things first find it so yeah of course i have changed it and there are other things if this doesn't work this says hey go and change further down but i would not recommend you to do deal with virtual host at the moment i think most cases it will be fixed only one thing because you have changed your port number when you type on your localhost you also have to add this port number with the localhost this is what the german said let's have a look but i have changed it my port but my port is still this so i have to stop my server i'm going to start it let's see which fold it connects eight zero one two this is fine so good now let's see if i can i've changed my port even though i didn't have the problem now this doesn't come if i if i if i do this i couldn't find it oh no i couldn't find it the reason that i couldn't find it because i forgot the port so do it like this put a colon here and say 80 12. remember you have to add this all the time if you had that problem now it's working so this will be your port i will put these things this one into description of the video so you can click and check how to fix the food as i said not everybody will have that problem those who have the problem please follow the procedure i hope this will help you to do this as i said make a shortcut here you can if you really want to go to hd doc often like you know you get tired of you know browsing all the way to hd doc you can do right click send a desktop icon then straight away you can access it double click on it i hope it is created somewhere as you can see i have hundreds of different icons god knows where i kept it anyway you can just quickly double click and go there anyway that's all for me uh today and do let me know if you have any problem understanding any of this thank you
Info
Channel: opeldo
Views: 147
Rating: undefined out of 5
Keywords:
Id: U3yymccjqlo
Channel Id: undefined
Length: 27min 49sec (1669 seconds)
Published: Tue Sep 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.