View previous topic :: View next topic |
Author |
Message |
jbraum -
Joined: 17 Dec 2003 Posts: 4
|
Posted: Sun Aug 29, 2004 7:22 pm Post subject: Another Error 200 |
|
|
I went through the forum and have a understanding what a error 200. Just need a little setting straight. The likely culprit of an Error 200 is the script???
Jbraum |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Mon Aug 30, 2004 11:06 am Post subject: |
|
|
Error 200 means that the script executed and run correctly, however there is no result to send to the browser. _________________ Olly |
|
Back to top |
|
 |
jbraum -
Joined: 17 Dec 2003 Posts: 4
|
Posted: Mon Aug 30, 2004 9:43 pm Post subject: |
|
|
Ok. So it is more than likely the there is an error in the php code rather that the webserver causing the error???
Jbraum |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Mon Aug 30, 2004 11:00 pm Post subject: |
|
|
no, no!!
no error has occurred, the script has been run correctly and has completed what ever task it has been programed to do, but their is no end result produced to send to the browser.
for example this script detects the browser and sets variables that are used to send the correct stylesheet, however this script alone has no result to send to the browser, it's just used as a tool for other scripts which set the stylesheet.
Quote: | if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
$stylesheet='<link rel="stylesheet" type="text/css" media="all" href="css/ie.css">';
}
elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false) {
$stylesheet='<link rel="stylesheet" type="text/css" media="all" href="css/opera.css">';
}
elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla') !== false) {
$stylesheet='<link rel="stylesheet" type="text/css" media="all" href="css/mozilla.css">';
}
else {
$stylesheet='<link rel="stylesheet" type="text/css" media="all" href="css/style.css">';
} |
_________________ Olly |
|
Back to top |
|
 |
jbraum -
Joined: 17 Dec 2003 Posts: 4
|
Posted: Wed Sep 01, 2004 1:21 am Post subject: |
|
|
Ok, but what can be done to resolve the issue?
Thanks,
Jbraum |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Wed Sep 01, 2004 11:06 am Post subject: |
|
|
just add something like: Code: | echo("this script has run correctly"); |
but if the script is writing to a database it could be: Code: | echo("the information has been successfully saved"); |
_________________ Olly |
|
Back to top |
|
 |
jbraum -
Joined: 17 Dec 2003 Posts: 4
|
Posted: Fri Sep 03, 2004 4:05 am Post subject: |
|
|
Hmm... That didn't seem to work. Any other suggestions?
Thanks
Jbraum |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Tue Sep 07, 2004 9:02 pm Post subject: |
|
|
sorry it's taken me a while to get back to you.
i can't think of any other method to get a browser output, however if you post the script, i might be able to work something out. _________________ Olly |
|
Back to top |
|
 |
olle -
Joined: 17 Apr 2004 Posts: 6
|
Posted: Thu Sep 16, 2004 4:27 am Post subject: hmms |
|
|
i had problem with Error 200 too :P
when i switched register_globals to ON all my problems was gone :P
i dont know if its a good thing to do, or if its a terrible mistace... but it worked :P |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Sep 16, 2004 5:21 am Post subject: |
|
|
Alot of Error 200's are usually caused by bad coding within the PHP script.
The most common mistakes are listed below , im not saying thats all of them.
01. Forgetting a ; at the end of print or echo.
02. Forgetting a { at the end of an If () else statement
03. Forgetting to add the PHP tags <?php & ?>
04. When adding HTML , make sure you use single ' quotes , this
will gurantee that no Error 200's will show up from the HTML code. |
|
Back to top |
|
 |
|