Jump to content

weird problem


orange08

Recommended Posts

last time, i did post a topic concerning why my page sometime will load as blank page when using IE. someone has told me that it might be my hosting server problem, too slow...

 

but, now after testing with 'echo' i found when the page reach this line, then it can't be continue...

<meta content="text/html; charset=utf-8" http-equiv="content-type"><title>My Site</title>

 

so, i thought is this line can't work properly in IE, but some other pages that got this similar line just work normally...so, i'm really don't know what's the problem...

 

can experienced experts here tell me what's going on?

Link to comment
Share on other sites

this may be a dumb suggestion and you may have already done these. but thought i mite just ask.

 

1. U sure php server is runnin?

2. is it a file .php extension or .html extension?

 

may be some one mite b able to help a bit more if you can post the problematic part of the code???

 

best of luck

Link to comment
Share on other sites

Does it give any more information?  Something like:

 

"A fatal error occurred when attempting to transcode the character encoding of

the document."

 

i get this:

Sorry, I am unable to validate this document because on line 111  it contained one or more bytes that I cannot interpret as utf-8  (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

 

The error was: utf8 "\xE7" does not map to Unicode

 

but, line 111 of my index.php is

</table>

Link to comment
Share on other sites

If that's the page you're having problems with then yes, post that code.

 

my index.php contains chinese character...

after i remove those chinese character, then can be validated...

 

for the page that i mention it'll loaded as blank page...need i paste the code here?

Link to comment
Share on other sites

have you tried direct input as I mentioned earlier?

 

actually, the page that will load as blank page not my index.php, it's other pages...they are load normally when run with mozilla, but when run with IE, SOMETIME(really can't understand why sometime) will load as blank page.

 

just now you all suggest me to validate with w3 validator, so i direct enter my site URL to validate, but then my site can't be validated as mentioned above. after i remove those chinese character in my index.php, then it can be validated now...

 

i tried validate direct input of the page that will sometime load as blank...and i get 11 errors and 2 warnings...

Link to comment
Share on other sites

Hi orange08,

 

I think I may have confused things when I said run your page/site through the validator.  When I said site I meant every page, page by page.

 

The W3C validator cannot validate an entire site by URL, just each page as you enter it into the validate box.

 

Enter the URI of the problematic page(s) into the validator box and fix any reported errors, then try again with loading the page in IE and see what results you get.

 

I hope this helps.

Link to comment
Share on other sites

Direct input means you copy your page's code into the validator, not only the url.

 

yup, i did copy and paste the page's code for the direct input validation...

 

but, the 11 errors i get are almost the same like:

 

#  Line 14, Column 40: character "0" not allowed in prolog

 

    if(mysql_num_rows($select_profile)>0){

 

 

# Error Line 19, Column 15: character "$" not allowed in prolog

 

    $_SESSION['edit_dob'] = $row["sbm_dob"];

 

which i can't understand...

Link to comment
Share on other sites

oh, this validator is for html only!

open your browser, get to your page, right-click anywhere and click source code.

copy THAT code and paste it into the validator

 

yup, i did try it already. but, as a newbie, i don't know how to debug it...

 

e.g.

Line 3, Column 6: document type does not allow element "HTML" here

 

<html>

 

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

 

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

 

 

this is my code from my php file

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta content="text/html; charset=utf-8" http-equiv="content-type"><title>My Site</title>
<html>
<head>
<?php
echo "test page!";
?>
</head>

Link to comment
Share on other sites

<meta content="text/html; charset=utf-8" http-equiv="content-type"><title>My Site</title>

 

These must be placed within the <head> tag.

 

"test page!" should be echo'd into the <body>!

 

like this?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"><title>My Site</title>
</head>

Link to comment
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<title>My Site</title>
</head>
<body>
<?php
echo "test page!";
?>
</body>
</html>

Link to comment
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<title>My Site</title>
</head>
<body>
<?php
echo "test page!";
?>
</body>
</html>

 

this didn't solve my blank page problem. as i have mentioned in my 1st post, i have detected that sometime when reach the line

<meta content="text/html; charset=utf-8" http-equiv="content-type">

 

then, the whole code just can't continue...

 

help, please!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.