Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

ok I give <?xml version="1.0" encoding="UTF-8"?>

Discussion in 'General Discussion' started by asmithjr, Sep 14, 2007.

  1. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    510
    Likes Received:
    5
    Trophy Points:
    168
    HTML pages that start with <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"


    are giving errors Parse error: syntax error, unexpected T_STRING in /home/barack/public_html/al.html on line 1


    What do we do to correct this.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    510
    Likes Received:
    5
    Trophy Points:
    168
    I believe it is a standard xml page

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
    xml:lang="en" >
    <head>
    <title>Virtual Library</title>
    </head>
    <body>
    <p>Moved to <a href="http://example.org/">example.org</a>.</p>
    <H1>HI</H1>
    </body>
    </html>

    Just a test page
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Off-hand, that error looks like it's being generated by the PHP Parser. Are those pure X/HTML pages or are those PHP pages?
     
  4. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    510
    Likes Received:
    5
    Trophy Points:
    168
    this problem has occurred again

    user is uploading files from iMac iWeb program, here is the file
    Code:
    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
     Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html
     xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="refre
    sh" content="0;url= Site/Welcome.html" /></head><body></body></html>
    
    when you view in browser you get
    Parse error: syntax error, unexpected T_STRING in /home/dannyhub/public_html/index.php on line 1

    If I remove the line
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    the web page displays normally. I know it is some setting in apache but have yet to find it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Testing this code, it appears the PHP parser is interpreting that code. Is this a .php file by chance?

    PHP will interpret code between <? ... ?> as PHP code (in addition to the typical <?php ... ?> tags).
     
  6. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    510
    Likes Received:
    5
    Trophy Points:
    168
    No it is a html file created by the iMac software.


    yes, but their software (all iWeb software) prepares a page this way.

    seems like there is something in apache conf I could do.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #6 asmithjr, Jan 9, 2008
    Last edited: Jan 9, 2008
  7. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    510
    Likes Received:
    5
    Trophy Points:
    168
    sorry I had changed the index.htm to index.php trying to see if that would work.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice