The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    475
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
  2. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    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:
    475
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    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:
    475
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
    #6 asmithjr, Jan 9, 2008
    Last edited: Jan 9, 2008
  7. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    sorry I had changed the index.htm to index.php trying to see if that would work.
     
Loading...

Share This Page