Difference between revisions of "PHP-and-MySQL/C2/XAMPP-in-Windows/English-timed"
From Script | Spoken-Tutorial
PoojaMoolya (Talk | contribs) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
|- | |- | ||
|00:01 | |00:01 | ||
− | |Hello and welcome to PHP Academy. | + | |Hello and welcome to '''PHP Academy'''. |
|- | |- | ||
|00:04 | |00:04 | ||
− | |I’m Alex and in this first basic tutorial, I’m going to take you through installing your | + | |I’m Alex and in this first basic tutorial, I’m going to take you through installing your '''web server'''. Installing PHP which comes with the package we’re going to use and also '''mysql''' which also comes with this package and we are going to be using it. |
|- | |- | ||
|00:22 | |00:22 | ||
− | |We’re going to use something called XAMPP. You can also call it | + | |We’re going to use something called XAMPP. You can also call it '''ZAMP''' as that's how it’s supposed to be pronounced; however, I’ll just refer to it as XAMPP. |
|- | |- | ||
|00:34 | |00:34 | ||
− | |What you need to do is | + | |What you need to do is: to get your server up and running with your PHP installation and your mysql database, you’ll need to visit this website here. |
|- | |- | ||
|00:46 | |00:46 | ||
Line 22: | Line 22: | ||
|- | |- | ||
|00:58 | |00:58 | ||
− | |And, I’ll just show you how to install it for | + | |And, I’ll just show you how to install it for '''Windows''', how to get everything up and running for Windows installation. |
|- | |- | ||
|01:06 | |01:06 | ||
− | |If you need any other help on, say Linux or any other | + | |If you need any other help on, say Linux or any other operating System, just let me know and I’ll be happy to make a tutorial. |
|- | |- | ||
|01:15 | |01:15 | ||
− | |So, we’ve come to the website and we need to choose this Installer here. | + | |So, we’ve come to the website and we need to choose this '''Installer''' here. |
|- | |- | ||
|01:19 | |01:19 | ||
Line 34: | Line 34: | ||
|- | |- | ||
|01:29 | |01:29 | ||
− | |First choose the Installer for that. | + | |First choose the '''Installer''' for that. |
|- | |- | ||
|01:32 | |01:32 | ||
− | |To install just double-click and run and choose your language. | + | |To install, just double-click and run and choose your language. |
|- | |- | ||
|01:37 | |01:37 | ||
− | |You | + | |You may get this message, I’m using Windows Vista, so it says that "Windows Vista Account is deactivated on your system". |
|- | |- | ||
|01:46 | |01:46 | ||
− | |This isn’t necessary for what we’re using. So ignore that if you do get that. | + | |This isn’t necessary for what we’re using. So, ignore that if you do get that. |
|- | |- | ||
|01:52 | |01:52 | ||
Line 49: | Line 49: | ||
|- | |- | ||
|01:56 | |01:56 | ||
− | |Make sure you choose your own local drive with a folder to keep things simple. Don’t bother putting it in Program Files. | + | |Make sure you choose your own '''local drive''' with a folder to keep things simple. Don’t bother putting it in '''Program Files'''. |
|- | |- | ||
|02:04 | |02:04 | ||
− | |These options really are up to you. I'll check the | + | |These options really are up to you. I'll check the '''Create a XAMPP desktop''' option. But I’ll not choose this one. |
|- | |- | ||
|02:16 | |02:16 | ||
− | |Now what you need to do is to choose to | + | |Now what you need to do is to choose to '''Install Apache as service''' and '''Install MySQL as service'''. |
|- | |- | ||
|02:24 | |02:24 | ||
− | |This will add it as a Systems Service and it will run every time you run your computer. | + | |This will add it as a '''Systems Service''' and it will run every time you run your computer. |
|- | |- | ||
|02:31 | |02:31 | ||
Line 73: | Line 73: | ||
|- | |- | ||
|03:00 | |03:00 | ||
− | |This is the local | + | |This is the local web server's host. |
|- | |- | ||
|03:05 | |03:05 | ||
Line 82: | Line 82: | ||
|- | |- | ||
|03:17 | |03:17 | ||
− | |But when we have installed | + | |But when we have installed '''XAMPP''' and we choose this '''localhost''' option again, we will, in fact, connect straight to our server. |
|- | |- | ||
− | | | + | |03:26 |
− | | | + | |'''XAMPP''' makes easy for us to install '''Apache''' which is '''http webserver''' and it will install '''php module''' on top of that and then install '''mysql database''' on the server. |
|- | |- | ||
|03:40 | |03:40 | ||
− | |So when we come back to this after we have installed, running our localhost should work. | + | |So, when we come back to this after we have installed, running our '''localhost''' should work. |
|- | |- | ||
|03:46 | |03:46 | ||
− | |And I'll also show you how to put files into your localhost directory. | + | |And I'll also show you how to put files into your '''localhost directory'''. |
|- | |- | ||
|03:52 | |03:52 | ||
− | |Its not called localhost but this is how we address our root server on our | + | |Its not called "localhost" but this is how we address our '''root server''' on our web server, a root folder, sorry, on our web server. |
|- | |- | ||
|04:01 | |04:01 | ||
− | |So when that's finished installing, I will come back to the video and we can go ahead. | + | |So, when that's finished installing, I will come back to the video and we can go ahead. |
|- | |- | ||
− | | | + | |04:06 |
|Okay, so we have finished installing and we have a few messages that just came up. | |Okay, so we have finished installing and we have a few messages that just came up. | ||
|- | |- | ||
|04:11 | |04:11 | ||
− | |Just go ahead and click | + | |Just go ahead and click '''Finish'''. |
|- | |- | ||
|04:14 | |04:14 | ||
− | |You can see here that what we are checking for necessary ports. | + | |You can see here that what we are checking is for necessary '''ports'''. |
|- | |- | ||
|04:23 | |04:23 | ||
− | |This means that it is checking port 80 and I think mysql | + | |This means that it is checking port 80 and I think '''mysql'''. |
|- | |- | ||
|04:27 | |04:27 | ||
− | |However, as long as you have no errors here | + | |However, as long as you have no errors here then you are absolutely fine. |
|- | |- | ||
|04:32 | |04:32 | ||
− | |You can see you're being set up with Apache 2.2 here. | + | |You can see you're being set up with '''Apache 2.2''' here. |
|- | |- | ||
|04:36 | |04:36 | ||
− | |And it looks as if the service is starting and also the mysql service is starting. | + | |And it looks as if the service is starting and also the '''mysql''' service is starting. |
|- | |- | ||
|04:42 | |04:42 | ||
− | |And we get a message | + | |And we get a message saying that our installation is finished. |
|- | |- | ||
|04:46 | |04:46 | ||
− | |Now we can start the | + | |Now we can start the XAMPP control panel. You click '''Yes''' and we can bring that over here. |
|- | |- | ||
|04:52 | |04:52 | ||
− | |You can see that we've got our Apache server running and our Mysql server running. | + | |You can see that we've got our '''Apache''' server running and our '''Mysql''' server running. |
|- | |- | ||
|04:58 | |04:58 | ||
− | |The reason you don't see PHP here is because PHP is part of our | + | |The reason that you don't see PHP here is because PHP is part of our web-server and so part of Apache. It is installed as a separate module and not run as a service. Its more of a module addition to our web-server. |
|- | |- | ||
|05:14 | |05:14 | ||
− | |So, | + | |So, let's go and load our page back over here. |
|- | |- | ||
|05:17 | |05:17 | ||
− | |And you can see that by pressing Enter on | + | |And you can see that by pressing '''Enter''' on '''localhost''' again, we've connected to "XAMPP" as you'll expect. |
|- | |- | ||
|05:25 | |05:25 | ||
− | |We can have a look inside a particular directory in our | + | |We can have a look inside a particular directory in our web-server as we usually would. |
|- | |- | ||
|05:30 | |05:30 | ||
− | |For now just go ahead and click English. | + | |For now, just go ahead and click '''English'''. |
|- | |- | ||
|05:33 | |05:33 | ||
Line 151: | Line 151: | ||
|- | |- | ||
|05:42 | |05:42 | ||
− | |And I'll click on | + | |And I'll click on '''XAMPP''' which is the '''installation directory''' we have installed. |
|- | |- | ||
|05:49 | |05:49 | ||
− | |We've got a few files here but the main one to focus is | + | |We've got a few files here but the main one to focus is '''htdocs'''. This is where you put your files that are to be run by your web-server and processed in '''php'''. |
|- | |- | ||
|06:02 | |06:02 | ||
− | |So if you double-click on this, you can see that we've got a variety of files here. | + | |So, if you double-click on this, you can see that we've got a variety of files here. |
|- | |- | ||
|06:07 | |06:07 | ||
Line 163: | Line 163: | ||
|- | |- | ||
|06:15 | |06:15 | ||
− | |And index dot anything in this file that's automatically started up. | + | |And "index dot" anything in this file that's automatically started up. |
|- | |- | ||
|06:20 | |06:20 | ||
Line 169: | Line 169: | ||
|- | |- | ||
|06:25 | |06:25 | ||
− | |And | + | |And, I've got a folder here called '''phpacademy'''. |
|- | |- | ||
|06:29 | |06:29 | ||
− | |What I'll do is create a new text document. | + | |What I'll do is, create a new text document. In fact, I will do this in my context editor as its a lot easier. |
|- | |- | ||
|06:38 | |06:38 | ||
− | | | + | |Let's get rid of this. Okay, so I'll create a new file. |
|- | |- | ||
|06:44 | |06:44 | ||
− | |I'll save that and that's saved to | + | |I'll save that and that's saved to my "htdocs" folder here and I'll just save it as "phpinfo" and dot php. |
|- | |- | ||
|06:53 | |06:53 | ||
− | |And inside here I'll type some php code. | + | |And inside here, I'll type some php code. |
|- | |- | ||
|06:59 | |06:59 | ||
− | |And this will be "php underscore info" and you need 2 brackets then you need a line terminator. | + | |And this will be "php underscore info" and you need 2 brackets, then you need a '''line terminator'''. |
|- | |- | ||
|07:06 | |07:06 | ||
− | |If you don't understand what this means, you don't need to learn it. | + | |If you don't understand what this means, you don't need to learn it. It's not a standard thing that you need to know for everyday use. |
|- | |- | ||
|07:14 | |07:14 | ||
− | |This is just giving us some information of our PHP server or our | + | |This is just giving us some information of our '''PHP server''' or our web-server php installation. |
|- | |- | ||
|07:20 | |07:20 | ||
− | |So we can come back to this and here we'll just address this | + | |So, we can come back to this and here we'll just address this; so you need "localhost". |
|- | |- | ||
|07:26 | |07:26 | ||
Line 199: | Line 199: | ||
|- | |- | ||
|07:29 | |07:29 | ||
− | |All we need is "localhost" and we need to type in | + | |All we need is "localhost" and we need to type in, lets see, what do we call our file: "phpinfo dot php". Press Enter. |
|- | |- | ||
|07:42 | |07:42 | ||
− | |We don't need the underscore. | + | |We don't need the '''underscore'''. So take away that and you need to refresh. |
|- | |- | ||
|07:50 | |07:50 | ||
Line 208: | Line 208: | ||
|- | |- | ||
|07:55 | |07:55 | ||
− | |So what is happening here is we are running a php script inside our htdocs file. | + | |So, what is happening here is we are running a '''php script''' inside our '''htdocs''' file. |
|- | |- | ||
|08:01 | |08:01 | ||
− | |So if I were to say address "favicon dot ico", you can see that we are getting that. | + | |So, if I were to say address "favicon dot ico", you can see that we are getting that. |
|- | |- | ||
|08:10 | |08:10 | ||
− | |Any files that you put inside "htdocs" are processed by your | + | |Any files that you put inside "htdocs" are processed by your web-server through php. |
|- | |- | ||
|08:18 | |08:18 | ||
− | |Any files that you write in the tutorials I have up here, just put them in "htdocs" folder in "c : \ xampp and htdocs" and anything in there will be processed. | + | |Any files that you write in the tutorials I have up here, just put them in "htdocs", a folder in "c : \ xampp and htdocs" and anything in there will be processed. |
|- | |- | ||
|08:34 | |08:34 | ||
− | |And you can address it either through localhost or 127.0.0.1. Pressing Enter you can see that nothing has changed. This is the same. This is just your local | + | |And you can address it either through '''localhost''' or '''127.0.0.1'''. Pressing Enter you can see that nothing has changed. This is the same. This is just your local web-server. |
|- | |- | ||
|08:50 | |08:50 | ||
− | |We have installed "XAMPP" | + | |We have installed "XAMPP" which is an easy way; short-cut way of installing your "Apache" service and your "mysql" service which is your database service you will use later on and also the "php module" for "Apache" which lets you process php files; obviously, that's very useful. |
|- | |- | ||
|09:10 | |09:10 | ||
− | |We've downloaded and installed | + | |We've downloaded and installed '''XAMPP''' and I've shown you how to '''create''' a file and '''run''' this through your web-server. |
|- | |- | ||
|09:16 | |09:16 | ||
− | |So hopefully this will be of use for you to start with the tutorials. If you have any problems feel free to contact me. | + | |So, hopefully this will be of use for you to start with the tutorials. If you have any problems feel free to contact me. |
|- | |- | ||
|09:23 | |09:23 | ||
Line 236: | Line 236: | ||
|- | |- | ||
|09:26 | |09:26 | ||
− | |This is Joshua Mathew dubbing for the Spoken Tutorial project. (Script contributed by Bhavini Pant and Nancy Varkey). | + | |This is Joshua Mathew, dubbing for the Spoken Tutorial project. (Script contributed by Bhavini Pant and Nancy Varkey). |
Latest revision as of 14:52, 24 March 2017
Time | Narration |
00:01 | Hello and welcome to PHP Academy. |
00:04 | I’m Alex and in this first basic tutorial, I’m going to take you through installing your web server. Installing PHP which comes with the package we’re going to use and also mysql which also comes with this package and we are going to be using it. |
00:22 | We’re going to use something called XAMPP. You can also call it ZAMP as that's how it’s supposed to be pronounced; however, I’ll just refer to it as XAMPP. |
00:34 | What you need to do is: to get your server up and running with your PHP installation and your mysql database, you’ll need to visit this website here. |
00:46 | Go to "apachefriends.org" or just google for "XAMPP". |
00:52 | It’s spelled like this here: X-A-M and double P. |
00:58 | And, I’ll just show you how to install it for Windows, how to get everything up and running for Windows installation. |
01:06 | If you need any other help on, say Linux or any other operating System, just let me know and I’ll be happy to make a tutorial. |
01:15 | So, we’ve come to the website and we need to choose this Installer here. |
01:19 | That will bring up this page and eventually you’ll end up with a file downloaded it like this one, with a version number. |
01:29 | First choose the Installer for that. |
01:32 | To install, just double-click and run and choose your language. |
01:37 | You may get this message, I’m using Windows Vista, so it says that "Windows Vista Account is deactivated on your system". |
01:46 | This isn’t necessary for what we’re using. So, ignore that if you do get that. |
01:52 | And you can just go ahead with your installation here. |
01:56 | Make sure you choose your own local drive with a folder to keep things simple. Don’t bother putting it in Program Files. |
02:04 | These options really are up to you. I'll check the Create a XAMPP desktop option. But I’ll not choose this one. |
02:16 | Now what you need to do is to choose to Install Apache as service and Install MySQL as service. |
02:24 | This will add it as a Systems Service and it will run every time you run your computer. |
02:31 | You’re welcome to keep these unchecked; I keep them checked for easy use. |
02:36 | And this is just going to install now. Now what I’ll do is leave that at that, I’ll pause the video and return when everything is installed. |
02:47 | Then I will take you through the rest of the setting up of your PHP installation. |
02:53 | Please note that before we install this, if I have a blank browser up here, and I try to acess localhost... |
03:00 | This is the local web server's host. |
03:05 | Usually you have a web address like "google dot com" but we are addressing this as "localhost". |
03:12 | You can see that we get a "Failed to connect" error message here. |
03:17 | But when we have installed XAMPP and we choose this localhost option again, we will, in fact, connect straight to our server. |
03:26 | XAMPP makes easy for us to install Apache which is http webserver and it will install php module on top of that and then install mysql database on the server. |
03:40 | So, when we come back to this after we have installed, running our localhost should work. |
03:46 | And I'll also show you how to put files into your localhost directory. |
03:52 | Its not called "localhost" but this is how we address our root server on our web server, a root folder, sorry, on our web server. |
04:01 | So, when that's finished installing, I will come back to the video and we can go ahead. |
04:06 | Okay, so we have finished installing and we have a few messages that just came up. |
04:11 | Just go ahead and click Finish. |
04:14 | You can see here that what we are checking is for necessary ports. |
04:23 | This means that it is checking port 80 and I think mysql. |
04:27 | However, as long as you have no errors here then you are absolutely fine. |
04:32 | You can see you're being set up with Apache 2.2 here. |
04:36 | And it looks as if the service is starting and also the mysql service is starting. |
04:42 | And we get a message saying that our installation is finished. |
04:46 | Now we can start the XAMPP control panel. You click Yes and we can bring that over here. |
04:52 | You can see that we've got our Apache server running and our Mysql server running. |
04:58 | The reason that you don't see PHP here is because PHP is part of our web-server and so part of Apache. It is installed as a separate module and not run as a service. Its more of a module addition to our web-server. |
05:14 | So, let's go and load our page back over here. |
05:17 | And you can see that by pressing Enter on localhost again, we've connected to "XAMPP" as you'll expect. |
05:25 | We can have a look inside a particular directory in our web-server as we usually would. |
05:30 | For now, just go ahead and click English. |
05:33 | And you can see that you have "XAMPP" set-up here. |
05:37 | Ok, now I'm going to open my "C" drive here and you can see it inside here. |
05:42 | And I'll click on XAMPP which is the installation directory we have installed. |
05:49 | We've got a few files here but the main one to focus is htdocs. This is where you put your files that are to be run by your web-server and processed in php. |
06:02 | So, if you double-click on this, you can see that we've got a variety of files here. |
06:07 | And this "index.html" is the file that you can see here. This is "index.php" for now, which is here. |
06:15 | And "index dot" anything in this file that's automatically started up. |
06:20 | You can change this but just leave it as that for now. |
06:25 | And, I've got a folder here called phpacademy. |
06:29 | What I'll do is, create a new text document. In fact, I will do this in my context editor as its a lot easier. |
06:38 | Let's get rid of this. Okay, so I'll create a new file. |
06:44 | I'll save that and that's saved to my "htdocs" folder here and I'll just save it as "phpinfo" and dot php. |
06:53 | And inside here, I'll type some php code. |
06:59 | And this will be "php underscore info" and you need 2 brackets, then you need a line terminator. |
07:06 | If you don't understand what this means, you don't need to learn it. It's not a standard thing that you need to know for everyday use. |
07:14 | This is just giving us some information of our PHP server or our web-server php installation. |
07:20 | So, we can come back to this and here we'll just address this; so you need "localhost". |
07:26 | And you don't need to type "htdocs" or anything like that. |
07:29 | All we need is "localhost" and we need to type in, lets see, what do we call our file: "phpinfo dot php". Press Enter. |
07:42 | We don't need the underscore. So take away that and you need to refresh. |
07:50 | You can see that we've got our php information file here with lots of data. |
07:55 | So, what is happening here is we are running a php script inside our htdocs file. |
08:01 | So, if I were to say address "favicon dot ico", you can see that we are getting that. |
08:10 | Any files that you put inside "htdocs" are processed by your web-server through php. |
08:18 | Any files that you write in the tutorials I have up here, just put them in "htdocs", a folder in "c : \ xampp and htdocs" and anything in there will be processed. |
08:34 | And you can address it either through localhost or 127.0.0.1. Pressing Enter you can see that nothing has changed. This is the same. This is just your local web-server. |
08:50 | We have installed "XAMPP" which is an easy way; short-cut way of installing your "Apache" service and your "mysql" service which is your database service you will use later on and also the "php module" for "Apache" which lets you process php files; obviously, that's very useful. |
09:10 | We've downloaded and installed XAMPP and I've shown you how to create a file and run this through your web-server. |
09:16 | So, hopefully this will be of use for you to start with the tutorials. If you have any problems feel free to contact me. |
09:23 | Please subscribe and I'll see you in the tutorials to come. Thanks for watching! |
09:26 | This is Joshua Mathew, dubbing for the Spoken Tutorial project. (Script contributed by Bhavini Pant and Nancy Varkey). |
Contributors and Content Editors
Gaurav, Minal, PoojaMoolya, Pratik kamble, Sandhya.np14, Sneha