Menu

#39 XML parser error 4: not well-formed (invalid token)

open-works-for-me
XSLT (10)
6
2005-09-01
2005-08-26
e_s
No

Hi,

I receive the following error after installing release
1.0.0 (2005-08-20), and trying to access pMH using
index.php:

Warning: Sablotron error on line 1: XML parser error 4:
not well-formed (invalid token) in C:\Program
Files\Apache Group\Apache\htdocs\pmh\index.php on line 31
Sorry, XML code could not be transformed. The reason is
XML parser error 4: not well-formed (invalid token) and
the error code is 2

I am using WinXP, PHP 4.3.11 and Apache 1.3.31 (with
MySQL).
The expat, iconv, sablot and php_xslt DLLs were taken
from the PHP 4.3.11 win32 zip file.

I have enabled XSLT in PHP, using the information here:
http://sniptools.com/tutorials/sablotron-xslt-php-apache-on-windows-and-a-basic-xslt-tutorial

And I have tested it using the files here:
http://sniptools.com/xsltest.zip

My installation is working perfectly with the test
files, but pMH/Sablotron gives the XML parser error.

Perhaps I am missing some other DLLs?

Please help!

Discussion

  • e_s

    e_s - 2005-08-26
    • priority: 5 --> 6
     
  • Jacopo Romei

    Jacopo Romei - 2005-08-26

    Logged In: YES
    user_id=672800

    In the config.php file set the right $GLOBALS['CONFIG']['DEBUG']
    and $GLOBALS['CONFIG']['DEBUGFILE'] values. In the debug file
    you'll find the XML stream saved just before converting it to XHTML.
    Check it for errors.
    It's probably a DB misconfiguration generating non-XML-wise
    errors. This is the most common and easiest to solve case.
    If things get harder my suggestion is to use an XML validator to
    seek well-form errors.

     
  • Jacopo Romei

    Jacopo Romei - 2005-08-26
    • assigned_to: nobody --> jakuza
    • labels: --> XSLT
    • status: open --> pending-accepted
     
  • e_s

    e_s - 2005-08-30

    Logged In: YES
    user_id=1335448

    Thanks for your assistance.

    I already had the appropriate DEBUG values set, however, I
    changed my php.ini error reporting settings to the following:
    error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
    in order to eliminate notices and warnings, and to reduce
    the size of the pMH-debug.xml file.

    I do not see any errors in the file (admittedly my knowledge
    is minimal, and perhaps I am missing something).

    I have attached the file for you to look at, in case you
    spot something obvious.

    Alternatively, could you recommend an "XML validator to seek
    well-form errors" ?

    Thanks.

     
  • e_s

    e_s - 2005-08-30
    • status: pending-accepted --> open-accepted
     
  • e_s

    e_s - 2005-08-30

    Logged In: YES
    user_id=1335448

    Thanks for your assistance.

    I already had the appropriate DEBUG values set, however, I
    changed my php.ini error reporting settings to the following:
    error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
    in order to eliminate notices and warnings, and to reduce
    the size of the pMH-debug.xml file.

    I do not see any errors in the file (admittedly my knowledge
    is minimal, and perhaps I am missing something).

    I have attached the file for you to look at, in case you
    spot something obvious.

    Alternatively, could you recommend an "XML validator to seek
    well-form errors" ?

    Thanks.

     
  • e_s

    e_s - 2005-08-30
    • status: open-accepted --> pending-accepted
     
  • e_s

    e_s - 2005-08-30
    • status: pending-accepted --> open-accepted
     
  • e_s

    e_s - 2005-08-30

    pMH Debug file

     
  • poip

    poip - 2005-08-31

    Logged In: YES
    user_id=1332659

    Hi!

    You can also set debug DB actif to find the error

    # DB debug mode activated - only if debug option above is
    activated too
    $GLOBALS['CONFIG']['DBDEBUG'] = true;

     
  • e_s

    e_s - 2005-09-01

    Logged In: YES
    user_id=1335448

    Thanks,

    I switched on DB Debug, and have now found a SQL error:
    1054: Unknown column 'TRUE' in 'where clause'

    I will attach the pMH-debug.xml file which displays the SQL
    that's causing the error.

    I have no idea where this SQL is stored (or is generated),
    but I presume that the TRUE value used as criteria in the
    WHERE Clause should be wrapped in quotes?

    Can you tell me where to fix this?

     
  • e_s

    e_s - 2005-09-01

    pMH debug file with DB Debug switched on

     
  • Jacopo Romei

    Jacopo Romei - 2005-09-01

    Logged In: YES
    user_id=672800

    In layouts/layDefault.php look for this
    # Properties highlights.
    if ($Fusebox['circuit'] != 'Affiliate' &&
    $Fusebox['circuit'] != 'Admin' && $Fusebox['circuit'] !=
    'Editor') {

    Module('index.php',
    array('fuseaction'=>'Highlights.Highlights',
    'stoplayout'=>'true'));

    }

    and try one of these:
    - comment the 'Module' line
    - remove the entire 'if' block

    I think the first will be enough.
    The problem is that highlights are not enabled yet on any
    pMH distribution, while partially implemented.
    Another thing: you are the one I heard of having this
    problem. I'll wait for others to face the same issue to
    raise its priority.
    Bye

     
  • Jacopo Romei

    Jacopo Romei - 2005-09-01
    • status: open-accepted --> open-works-for-me
     
  • e_s

    e_s - 2005-09-02

    pMH-debug.xml after commenting IF block

     
  • e_s

    e_s - 2005-09-02

    Logged In: YES
    user_id=1335448

    Thanks, but I still have a problem.

    I tried your fix, first commenting just the Module line, and
    then the entire IF block. The SQL error no longer exists
    (the WHERE clause uses NULL as criteria now) but I still get
    the original not well-formed (invalid token) message.

    I have attached the pMH-debug.xml file again.

    Perhaps you are able to see further problems?

     
  • Jacopo Romei

    Jacopo Romei - 2005-09-12

    Logged In: YES
    user_id=672800

    Check you have MySQL 4.1 please. 4.0.x releases seem to be
    not enough.
    Regards

     
  • Nobody/Anonymous

    Logged In: NO

    I have same problem
    Help me pleaze!
    Thanks

     
  • Nobody/Anonymous

    Logged In: NO

    Please Use PHP <5

     
  • Mustafa USTUNSOZ

    Logged In: YES
    user_id=1510412

    Dear Jakuza;

    I have compleetle same problem and comments on this page
    are not helped me, after I do direction of comment I
    started to receive more error.

    Please help me urgently

    Warning: fopen(/tmp/pMH-debug.xml): failed to open stream:
    No such file or directory in C:\Program
    Files\xampp\htdocs\pmh\src\index.php on line 20

    Warning: fwrite(): supplied argument is not a valid stream
    resource in C:\Program Files\xampp\htdocs\pmh\src\index.php
    on line 21

    Warning: fclose(): supplied argument is not a valid stream
    resource in C:\Program Files\xampp\htdocs\pmh\src\index.php
    on line 22

    Warning: Sablotron error on line 1: XML parser error 4: not
    well-formed (invalid token) in C:\Program
    Files\xampp\htdocs\pmh\src\index.php on line 31
    Sorry, XML code could not be transformed. The reason is XML
    parser error 4: not well-formed (invalid token) and the
    error code is 2

     

Log in to post a comment.

MongoDB Logo MongoDB