Results 1 to 7 of 7

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

  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    396

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

    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.
    -Albert

  2. #2
    Member
    Join Date
    Jun 2003
    Posts
    396

    Default

    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
    -Albert

  3. #3
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by asmithjr View Post
    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.
    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. #4
    Member
    Join Date
    Jun 2003
    Posts
    396

    Default

    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.
    -Albert

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    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. #6
    Member
    Join Date
    Jun 2003
    Posts
    396

    Default

    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.
    Last edited by asmithjr; 01-09-2008 at 01:08 PM.
    -Albert

  7. #7
    Member
    Join Date
    Jun 2003
    Posts
    396

    Default

    sorry I had changed the index.htm to index.php trying to see if that would work.
    -Albert

Similar Threads

  1. Replies: 1
    Last Post: 05-03-2011, 12:28 PM
  2. Replies: 8
    Last Post: 02-11-2011, 01:39 PM
  3. Add "delete list" button in WHM on "Reset a Mailman Password" page
    By cPanelMary in forum Feature Requests for cPanel & WHM
    Replies: 0
    Last Post: 01-08-2011, 12:19 AM
  4. "Leave DNS on server" option missing from reseller center "terminate accounts" page.
    By electric in forum Feature Requests for cPanel & WHM
    Replies: 3
    Last Post: 04-19-2010, 02:14 PM