Difference between revisions of "PHP-and-MySQL/C2/Common-Errors-Part-3/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{| border=1 !Time !Narration |- |0:00 |Right now I am onto the last two common errors that I have included. |- |0:05 |And we will start with the hard one. |- |0:09 |This is php…')
 
Line 1: Line 1:
 
{| border=1
 
{| border=1
!Time
+
|'''Time'''
!Narration
+
|'''Narration'''
 
|-
 
|-
|0:00
+
|00:00
 
|Right now I am onto the last two common errors that I have included.  
 
|Right now I am onto the last two common errors that I have included.  
 
|-
 
|-
|0:05
+
|00:05
 
|And we will start with the hard one.  
 
|And we will start with the hard one.  
 
|-
 
|-
|0:09
+
|00:09
 
|This is php header and we are using "header" function going to a location.
 
|This is php header and we are using "header" function going to a location.
 
|-
 
|-
|0:14
+
|00:14
 
|And here I have got some html code.  
 
|And here I have got some html code.  
 
|-
 
|-
|0:18
+
|00:18
 
|This is a header tag, I am saying "Welcome!".
 
|This is a header tag, I am saying "Welcome!".
 
|-
 
|-
|0:21
+
|00:21
 
|And our "goto" variable is "google dot com".
 
|And our "goto" variable is "google dot com".
 
|-
 
|-
|0:26
+
|00:26
 
|If the "goto" exists, which it currently does, we are going to redirect the page to a u-r-l "google dot com".  
 
|If the "goto" exists, which it currently does, we are going to redirect the page to a u-r-l "google dot com".  
 
|-
 
|-
|0:35
+
|00:35
 
|Right now, this will return an error.
 
|Right now, this will return an error.
 
|-
 
|-
|0:37
+
|00:37
 
|And the error is - Oh! um... Okay that’s why. "o b start".
 
|And the error is - Oh! um... Okay that’s why. "o b start".
 
|-
 
|-
|0:50
+
|00:50
 
|Lets get rid of this.  That wasn’t supposed to be there. That code is to fix the error!
 
|Lets get rid of this.  That wasn’t supposed to be there. That code is to fix the error!
 
|-
 
|-
|0:56
+
|00:56
 
|Sorry, so we will go to "php header" and we have got "Welcome!" - our html code.
 
|Sorry, so we will go to "php header" and we have got "Welcome!" - our html code.
 
|-
 
|-
|1:03
+
|01:03
 
|Then a warning - "Cannot modify  header information – headers already sent by..." and all of this.
 
|Then a warning - "Cannot modify  header information – headers already sent by..." and all of this.
 
|-
 
|-
|1:10
+
|01:10
 
|Okay so our headers have already been sent. This is the line no. by the way.
 
|Okay so our headers have already been sent. This is the line no. by the way.
 
|-
 
|-
|1:16
+
|01:16
 
|1, 2, 3 so if it gives you an error like "phpheader dot php" colon 3, then the error has occurred on the line no. 3.
 
|1, 2, 3 so if it gives you an error like "phpheader dot php" colon 3, then the error has occurred on the line no. 3.
 
|-
 
|-
|1:26
+
|01:26
 
|So that's where the error is - on line 3, okay?  
 
|So that's where the error is - on line 3, okay?  
 
|-
 
|-
|1:32
+
|01:32
 
|And this error has been generated by line 9, which if you go here, is our "header" function.  
 
|And this error has been generated by line 9, which if you go here, is our "header" function.  
 
|-
 
|-
|1:39
+
|01:39
 
|So the reason that this is happening is we are already sending our html code.
 
|So the reason that this is happening is we are already sending our html code.
 
|-
 
|-
|1:47
+
|01:47
 
|If I get rid of this by commenting it, and I were to refresh then we would be redirected to google.
 
|If I get rid of this by commenting it, and I were to refresh then we would be redirected to google.
 
|-
 
|-
|1:54
+
|01:54
 
|But the point is that we want this welcome header here.
 
|But the point is that we want this welcome header here.
 
|-
 
|-
|1:59
+
|01:59
 
|And you can’t actually put html before a header function, going to location and other features of this function.  
 
|And you can’t actually put html before a header function, going to location and other features of this function.  
 
|-
 
|-
|2:10
+
|02:10
 
|You shouldn't do so.
 
|You shouldn't do so.
 
|-
 
|-
|2:15
+
|02:15
 
|So as you saw a minute ago that is "ob underscore start".
 
|So as you saw a minute ago that is "ob underscore start".
 
|-
 
|-
|2:20
+
|02:20
 
|What this does is, it fixes this problem for us.
 
|What this does is, it fixes this problem for us.
 
|-
 
|-
|2:25
+
|02:25
 
|So I can come here to "phpheader" and it works, even though I have still got my html code echoed here before my header.
 
|So I can come here to "phpheader" and it works, even though I have still got my html code echoed here before my header.
 
|-
 
|-
|2:37
+
|02:37
 
|So without this we get an error (pause) and with this our header works fine, okay?   
 
|So without this we get an error (pause) and with this our header works fine, okay?   
 
|-
 
|-
|2:47
+
|02:47
 
|Despite the initial rule of no html output before header up here.
 
|Despite the initial rule of no html output before header up here.
 
|-
 
|-
|2:53
+
|02:53
 
|That should be pretty clear by now.
 
|That should be pretty clear by now.
 
|-
 
|-
|2:55
+
|02:55
 
|Now, the last one is extremely simple.  
 
|Now, the last one is extremely simple.  
 
|-
 
|-
|2:58
+
|02:58
 
|I don’t even need to explain it but anyway.
 
|I don’t even need to explain it but anyway.
 
|-
 
|-
|3:02
+
|03:02
 
|This is "include a file which doesn’t even exist" named as "idontexist dot php".  
 
|This is "include a file which doesn’t even exist" named as "idontexist dot php".  
 
|-
 
|-
|3:08
+
|03:08
 
|So lets have a look. Um.. where is it? "missing dot php".  
 
|So lets have a look. Um.. where is it? "missing dot php".  
 
|-
 
|-
|3:13
+
|03:13
 
|Oh no! Its not.  "open dot php".  
 
|Oh no! Its not.  "open dot php".  
 
|-
 
|-
|3:16
+
|03:16
 
|Okay! So - include "idontexist dot php" failed to open stream; no such file or directory in that name here.
 
|Okay! So - include "idontexist dot php" failed to open stream; no such file or directory in that name here.
 
|-
 
|-
|3:25
+
|03:25
 
|Our file name and directory on line 3.
 
|Our file name and directory on line 3.
 
|-
 
|-
|3:27
+
|03:27
 
|So lets come to line 3.
 
|So lets come to line 3.
 
|-
 
|-
|3:30
+
|03:30
 
|And that is the only line of significant code in this file.
 
|And that is the only line of significant code in this file.
 
|-
 
|-
|3:35
+
|03:35
 
|We have another warning here - Failed to open "idontexist dot php" for inclusion and all of this.  So we get two errors.  
 
|We have another warning here - Failed to open "idontexist dot php" for inclusion and all of this.  So we get two errors.  
 
|-
 
|-
|3:43
+
|03:43
 
|This is quite messy when you have a page that has "include a header file".
 
|This is quite messy when you have a page that has "include a header file".
 
|-
 
|-
|3:50
+
|03:50
 
|Then these don’t look too nice. I mean you have probably been in a website before and you have seen this at the top.  
 
|Then these don’t look too nice. I mean you have probably been in a website before and you have seen this at the top.  
 
|-
 
|-
|3:57
+
|03:57
 
|You need to be attractive.  So you can put a "@ (at)" symbol in front and refresh.
 
|You need to be attractive.  So you can put a "@ (at)" symbol in front and refresh.
 
|-
 
|-
|4:02
+
|04:02
 
|That won't show the error anymore.  
 
|That won't show the error anymore.  
 
|-
 
|-
|4:06
+
|04:06
 
|But it doesn’t excuse the fact that the file doesn’t exist.
 
|But it doesn’t excuse the fact that the file doesn’t exist.
 
|-
 
|-
|4:10
+
|04:10
 
|So the content of the file which doesn’t exist, won’t be included.  
 
|So the content of the file which doesn’t exist, won’t be included.  
 
|-
 
|-
|4:14
+
|04:14
 
|But yes, to be honest, looking at this, this is really pretty much self explanatory.  I just thought I should explain this anyways.
 
|But yes, to be honest, looking at this, this is really pretty much self explanatory.  I just thought I should explain this anyways.
 
|-
 
|-
|4:23
+
|04:23
 
|So we have got a small collection of errors that you might come across when you are programming in php.  
 
|So we have got a small collection of errors that you might come across when you are programming in php.  
 
|-
 
|-
|4:30
+
|04:30
 
|If there are other errors that you are getting, then please message me and I will be happy to help.  
 
|If there are other errors that you are getting, then please message me and I will be happy to help.  
 
|-
 
|-
|4:39
+
|04:39
 
|Please subscribe for latest updates. Thanks for watching. This is Evan Varkey dubbing for the Spoken Tutorial project.
 
|Please subscribe for latest updates. Thanks for watching. This is Evan Varkey dubbing for the Spoken Tutorial project.

Revision as of 11:49, 10 July 2014

Time Narration
00:00 Right now I am onto the last two common errors that I have included.
00:05 And we will start with the hard one.
00:09 This is php header and we are using "header" function going to a location.
00:14 And here I have got some html code.
00:18 This is a header tag, I am saying "Welcome!".
00:21 And our "goto" variable is "google dot com".
00:26 If the "goto" exists, which it currently does, we are going to redirect the page to a u-r-l "google dot com".
00:35 Right now, this will return an error.
00:37 And the error is - Oh! um... Okay that’s why. "o b start".
00:50 Lets get rid of this. That wasn’t supposed to be there. That code is to fix the error!
00:56 Sorry, so we will go to "php header" and we have got "Welcome!" - our html code.
01:03 Then a warning - "Cannot modify header information – headers already sent by..." and all of this.
01:10 Okay so our headers have already been sent. This is the line no. by the way.
01:16 1, 2, 3 so if it gives you an error like "phpheader dot php" colon 3, then the error has occurred on the line no. 3.
01:26 So that's where the error is - on line 3, okay?
01:32 And this error has been generated by line 9, which if you go here, is our "header" function.
01:39 So the reason that this is happening is we are already sending our html code.
01:47 If I get rid of this by commenting it, and I were to refresh then we would be redirected to google.
01:54 But the point is that we want this welcome header here.
01:59 And you can’t actually put html before a header function, going to location and other features of this function.
02:10 You shouldn't do so.
02:15 So as you saw a minute ago that is "ob underscore start".
02:20 What this does is, it fixes this problem for us.
02:25 So I can come here to "phpheader" and it works, even though I have still got my html code echoed here before my header.
02:37 So without this we get an error (pause) and with this our header works fine, okay?
02:47 Despite the initial rule of no html output before header up here.
02:53 That should be pretty clear by now.
02:55 Now, the last one is extremely simple.
02:58 I don’t even need to explain it but anyway.
03:02 This is "include a file which doesn’t even exist" named as "idontexist dot php".
03:08 So lets have a look. Um.. where is it? "missing dot php".
03:13 Oh no! Its not. "open dot php".
03:16 Okay! So - include "idontexist dot php" failed to open stream; no such file or directory in that name here.
03:25 Our file name and directory on line 3.
03:27 So lets come to line 3.
03:30 And that is the only line of significant code in this file.
03:35 We have another warning here - Failed to open "idontexist dot php" for inclusion and all of this. So we get two errors.
03:43 This is quite messy when you have a page that has "include a header file".
03:50 Then these don’t look too nice. I mean you have probably been in a website before and you have seen this at the top.
03:57 You need to be attractive. So you can put a "@ (at)" symbol in front and refresh.
04:02 That won't show the error anymore.
04:06 But it doesn’t excuse the fact that the file doesn’t exist.
04:10 So the content of the file which doesn’t exist, won’t be included.
04:14 But yes, to be honest, looking at this, this is really pretty much self explanatory. I just thought I should explain this anyways.
04:23 So we have got a small collection of errors that you might come across when you are programming in php.
04:30 If there are other errors that you are getting, then please message me and I will be happy to help.
04:39 Please subscribe for latest updates. Thanks for watching. This is Evan Varkey dubbing for the Spoken Tutorial project.

Contributors and Content Editors

Minal, Pratik kamble, Sandhya.np14