Professional Web Applications Themes

#45996 [NEW]: libxml2 2.7.1 causes breakage with character data in xml_p() - PHP Bugs

From: phpbugs at colin dot guthr dot ie Operating system: Mandriva Linux PHP version: 5.2.6 PHP Bug Type: *XML functions Bug description: libxml2 2.7.1 causes breakage with character data in xml_p() Description: ------------ With libxml2 2.7.1, When using the expat type xml parsing routines in PHP, the characater data seems to silently drop any encoded text e.g. &gt; &lt; and friends. Please see Mandriva bug for details: https://qa.mandriva.com/show_bug.cgi?id=43486 And also please note the thread on the libxml mailing list: http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610 And most notably the reply to the above thread: <quote> Can you report this as a PHP bug? It looks ...

  1. #1

    Default #45996 [NEW]: libxml2 2.7.1 causes breakage with character data in xml_p()

    From: phpbugs at colin dot guthr dot ie
    Operating system: Mandriva Linux
    PHP version: 5.2.6
    PHP Bug Type: *XML functions
    Bug description: libxml2 2.7.1 causes breakage with character data in xml_p()

    Description:
    ------------
    With libxml2 2.7.1, When using the expat type xml parsing routines in PHP,
    the characater data seems to silently drop any encoded text e.g. &gt; &lt;
    and friends.

    Please see Mandriva bug for details:
    https://qa.mandriva.com/show_bug.cgi?id=43486

    And also please note the thread on the libxml mailing list:
    http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610

    And most notably the reply to the above thread:
    <quote>
    Can you report this as a PHP bug? It looks like some really old hack
    code in the PHP extension in order to mimic some specific expat
    functionality. The behavior change you see though resulting from a code
    changes in libxml2 is really due to the hackish code in the extension doing
    things it wasnt meant to be doing.
    </quote>

    Reproduce code:
    ---------------
    Please see this code:
    https://qa.mandriva.com/attachment.cgi?id=10757

    Expected result:
    ----------------
    <
    foo 
    wibble
    <
    /foo 


    Actual result:
    --------------
    foo
    wibble
    /foo


    --
    Edit bug report at http://bugs.php.net/?id=45996&edit=1
    --
    Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45996&r=trysnapshot52
    Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45996&r=trysnapshot53
    Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45996&r=trysnapshot60
    Fixed in CVS: http://bugs.php.net/fix.php?id=45996&r=fixedcvs
    Fixed in release: http://bugs.php.net/fix.php?id=45996&r=alreadyfixed
    Need backtrace: http://bugs.php.net/fix.php?id=45996&r=needtrace
    Need Reproduce Script: http://bugs.php.net/fix.php?id=45996&r=needscript
    Try newer version: http://bugs.php.net/fix.php?id=45996&r=oldversion
    Not developer issue: http://bugs.php.net/fix.php?id=45996&r=support
    Expected behavior: http://bugs.php.net/fix.php?id=45996&r=notwrong
    Not enough info: http://bugs.php.net/fix.php?id=45996&r=notenoughinfo
    Submitted twice: http://bugs.php.net/fix.php?id=45996&r=submittedtwice
    register_globals: http://bugs.php.net/fix.php?id=45996&r=globals
    PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45996&r=php4
    Daylight Savings: http://bugs.php.net/fix.php?id=45996&r=dst
    IIS Stability: http://bugs.php.net/fix.php?id=45996&r=isapi
    Install GNU Sed: http://bugs.php.net/fix.php?id=45996&r=gnused
    Floating point limitations: http://bugs.php.net/fix.php?id=45996&r=float
    No Zend Extensions: http://bugs.php.net/fix.php?id=45996&r=nozend
    MySQL Configuration Error: http://bugs.php.net/fix.php?id=45996&r=mysqlcfg

    phpbugs Guest

  2. #2

    Default #45996 [Opn]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Updated by: net
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Open
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    -Assigned To:
    +Assigned To: rrichards
    New Comment:

    assign to self


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-09-04 17:29:21] phpbugs at colin dot guthr dot ie

    Description:
    ------------
    With libxml2 2.7.1, When using the expat type xml parsing routines in
    PHP, the characater data seems to silently drop any encoded text e.g.
    &gt; &lt; and friends.

    Please see Mandriva bug for details:
    https://qa.mandriva.com/show_bug.cgi?id=43486

    And also please note the thread on the libxml mailing list:
    http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610

    And most notably the reply to the above thread:
    <quote>
    Can you report this as a PHP bug? It looks like some really old hack
    code in the PHP extension in order to mimic some specific expat
    functionality. The behavior change you see though resulting from a code
    changes in libxml2 is really due to the hackish code in the extension
    doing things it wasnt meant to be doing.
    </quote>

    Reproduce code:
    ---------------
    Please see this code:
    https://qa.mandriva.com/attachment.cgi?id=10757

    Expected result:
    ----------------
    <
    foo 
    wibble
    <
    /foo 


    Actual result:
    --------------
    foo
    wibble
    /foo



    ------------------------------------------------------------------------


    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    rrichards@php.net Guest

  3. #3

    Default #45996 [Opn->Asn]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Updated by: net
    Reported By: phpbugs at colin dot guthr dot ie
    -Status: Open
    +Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    Assigned to the maintainer (Rob, don't forget to change status too when
    you assign something to yourself :)


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-09-04 17:29:21] phpbugs at colin dot guthr dot ie

    Description:
    ------------
    With libxml2 2.7.1, When using the expat type xml parsing routines in
    PHP, the characater data seems to silently drop any encoded text e.g.
    &gt; &lt; and friends.

    Please see Mandriva bug for details:
    https://qa.mandriva.com/show_bug.cgi?id=43486

    And also please note the thread on the libxml mailing list:
    http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610

    And most notably the reply to the above thread:
    <quote>
    Can you report this as a PHP bug? It looks like some really old hack
    code in the PHP extension in order to mimic some specific expat
    functionality. The behavior change you see though resulting from a code
    changes in libxml2 is really due to the hackish code in the extension
    doing things it wasnt meant to be doing.
    </quote>

    Reproduce code:
    ---------------
    Please see this code:
    https://qa.mandriva.com/attachment.cgi?id=10757

    Expected result:
    ----------------
    <
    foo 
    wibble
    <
    /foo 


    Actual result:
    --------------
    foo
    wibble
    /foo



    ------------------------------------------------------------------------


    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    jani@php.net Guest

  4. #4

    Default #45996 [Asn]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    User updated by: phpbugs at colin dot guthr dot ie
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    Comments by Daniel Veillard on the libxml ML:

    The only thing I can think of is that libxml2 doesn't anymore ask
    though a SAX callback when looking for entities references if they
    are in the predefined set. This comes in essence by an old decision
    from the XML working group stating that user definition for those 5
    entities could not override the default predefined ones. So I guess
    that change is logical. Now what is done on top of SAX to result
    in that bug, I don't really know :-\


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-09-06 15:43:29] net

    Assigned to the maintainer (Rob, don't forget to change status too when
    you assign something to yourself :)

    ------------------------------------------------------------------------

    [2008-09-04 17:29:21] phpbugs at colin dot guthr dot ie

    Description:
    ------------
    With libxml2 2.7.1, When using the expat type xml parsing routines in
    PHP, the characater data seems to silently drop any encoded text e.g.
    &gt; &lt; and friends.

    Please see Mandriva bug for details:
    https://qa.mandriva.com/show_bug.cgi?id=43486

    And also please note the thread on the libxml mailing list:
    http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610

    And most notably the reply to the above thread:
    <quote>
    Can you report this as a PHP bug? It looks like some really old hack
    code in the PHP extension in order to mimic some specific expat
    functionality. The behavior change you see though resulting from a code
    changes in libxml2 is really due to the hackish code in the extension
    doing things it wasnt meant to be doing.
    </quote>

    Reproduce code:
    ---------------
    Please see this code:
    https://qa.mandriva.com/attachment.cgi?id=10757

    Expected result:
    ----------------
    <
    foo 
    wibble
    <
    /foo 


    Actual result:
    --------------
    foo
    wibble
    /foo



    ------------------------------------------------------------------------


    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    phpbugs Guest

  5. #5

    Default #45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Comment by: ptn at post dot cz
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    this bug seems to be fixed in libxm2-2.7.2

    http://svn.gnome.org/viewvc/libxml2?view=revision&revision=3798


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-09-09 23:06:00] phpbugs at colin dot guthr dot ie

    Comments by Daniel Veillard on the libxml ML:

    The only thing I can think of is that libxml2 doesn't anymore ask
    though a SAX callback when looking for entities references if they
    are in the predefined set. This comes in essence by an old decision
    from the XML working group stating that user definition for those 5
    entities could not override the default predefined ones. So I guess
    that change is logical. Now what is done on top of SAX to result
    in that bug, I don't really know :-\

    ------------------------------------------------------------------------

    [2008-09-06 15:43:29] net

    Assigned to the maintainer (Rob, don't forget to change status too when
    you assign something to yourself :)

    ------------------------------------------------------------------------

    [2008-09-04 17:29:21] phpbugs at colin dot guthr dot ie

    Description:
    ------------
    With libxml2 2.7.1, When using the expat type xml parsing routines in
    PHP, the characater data seems to silently drop any encoded text e.g.
    &gt; &lt; and friends.

    Please see Mandriva bug for details:
    https://qa.mandriva.com/show_bug.cgi?id=43486

    And also please note the thread on the libxml mailing list:
    http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610

    And most notably the reply to the above thread:
    <quote>
    Can you report this as a PHP bug? It looks like some really old hack
    code in the PHP extension in order to mimic some specific expat
    functionality. The behavior change you see though resulting from a code
    changes in libxml2 is really due to the hackish code in the extension
    doing things it wasnt meant to be doing.
    </quote>

    Reproduce code:
    ---------------
    Please see this code:
    https://qa.mandriva.com/attachment.cgi?id=10757

    Expected result:
    ----------------
    <
    foo 
    wibble
    <
    /foo 


    Actual result:
    --------------
    foo
    wibble
    /foo



    ------------------------------------------------------------------------


    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    ptn Guest

  6. #6

    Default #45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Comment by: uraes at hot dot ee
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    just tried libxml2-2.7.2 and 5.2.6-pl7-gentoo and it is still broken:

    Example PHP code:
    <?
    $data="<?xml version = '1.0' encoding = 'UTF-8'?>
    <rss version=\"2.0\" >
    <channel>
    <item>
    <description>&lt;a
    href=&quot;http://www.google.com&quot;>Google&lt;/a></description>
    </item>
    </channel>
    </rss>
    ";

    $pr = xml_pr_create('UTF-8');
    xml_pr_set_option($pr, XML_OPTION_SKIP_WHITE, 1);
    xml_p_into_struct($pr, $data, $vals, $index);
    xml_pr_free($pr);

    echo "<pre>";

    echo "<b>Original XML:</b><br>".htmlentities($data);

    echo "<br><br><b>Pd struct:</b><br>";
    print_r($vals);
    ?>

    ... pd result is "a href=http://www.google.com>Google/a>"


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-10-07 11:19:33] ptn at post dot cz

    this bug seems to be fixed in libxm2-2.7.2

    http://svn.gnome.org/viewvc/libxml2?view=revision&revision=3798

    ------------------------------------------------------------------------

    [2008-09-09 23:06:00] phpbugs at colin dot guthr dot ie

    Comments by Daniel Veillard on the libxml ML:

    The only thing I can think of is that libxml2 doesn't anymore ask
    though a SAX callback when looking for entities references if they
    are in the predefined set. This comes in essence by an old decision
    from the XML working group stating that user definition for those 5
    entities could not override the default predefined ones. So I guess
    that change is logical. Now what is done on top of SAX to result
    in that bug, I don't really know :-\

    ------------------------------------------------------------------------

    [2008-09-06 15:43:29] net

    Assigned to the maintainer (Rob, don't forget to change status too when
    you assign something to yourself :)

    ------------------------------------------------------------------------

    [2008-09-04 17:29:21] phpbugs at colin dot guthr dot ie

    Description:
    ------------
    With libxml2 2.7.1, When using the expat type xml parsing routines in
    PHP, the characater data seems to silently drop any encoded text e.g.
    &gt; &lt; and friends.

    Please see Mandriva bug for details:
    https://qa.mandriva.com/show_bug.cgi?id=43486

    And also please note the thread on the libxml mailing list:
    http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610

    And most notably the reply to the above thread:
    <quote>
    Can you report this as a PHP bug? It looks like some really old hack
    code in the PHP extension in order to mimic some specific expat
    functionality. The behavior change you see though resulting from a code
    changes in libxml2 is really due to the hackish code in the extension
    doing things it wasnt meant to be doing.
    </quote>

    Reproduce code:
    ---------------
    Please see this code:
    https://qa.mandriva.com/attachment.cgi?id=10757

    Expected result:
    ----------------
    <
    foo 
    wibble
    <
    /foo 


    Actual result:
    --------------
    foo
    wibble
    /foo



    ------------------------------------------------------------------------


    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    uraes Guest

  7. #7

    Default #45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Comment by: phpbugs at colin dot guthr dot ie
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    Yes, I suspect that the comments left by ptn at post dot cz are
    incorrect when they say it is fixed in libxml. rrichards has given a
    very complete explanation of the problem and it is more fundamental than
    a simple bug.

    Compiling PHP with libexpat is the correct workaround for now.


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-10-08 09:18:54] uraes at hot dot ee

    just tried libxml2-2.7.2 and 5.2.6-pl7-gentoo and it is still broken:

    Example PHP code:
    <?
    $data="<?xml version = '1.0' encoding = 'UTF-8'?>
    <rss version=\"2.0\" >
    <channel>
    <item>
    <description>&lt;a
    href=&quot;http://www.google.com&quot;>Google&lt;/a></description>
    </item>
    </channel>
    </rss>
    ";

    $pr = xml_pr_create('UTF-8');
    xml_pr_set_option($pr, XML_OPTION_SKIP_WHITE, 1);
    xml_p_into_struct($pr, $data, $vals, $index);
    xml_pr_free($pr);

    echo "<pre>";

    echo "<b>Original XML:</b><br>".htmlentities($data);

    echo "<br><br><b>Pd struct:</b><br>";
    print_r($vals);
    ?>

    ... pd result is "a href=http://www.google.com>Google/a>"

    ------------------------------------------------------------------------

    [2008-10-07 11:19:33] ptn at post dot cz

    this bug seems to be fixed in libxm2-2.7.2

    http://svn.gnome.org/viewvc/libxml2?view=revision&revision=3798

    ------------------------------------------------------------------------

    [2008-09-09 23:06:00] phpbugs at colin dot guthr dot ie

    Comments by Daniel Veillard on the libxml ML:

    The only thing I can think of is that libxml2 doesn't anymore ask
    though a SAX callback when looking for entities references if they
    are in the predefined set. This comes in essence by an old decision
    from the XML working group stating that user definition for those 5
    entities could not override the default predefined ones. So I guess
    that change is logical. Now what is done on top of SAX to result
    in that bug, I don't really know :-\

    ------------------------------------------------------------------------

    [2008-09-06 15:43:29] net

    Assigned to the maintainer (Rob, don't forget to change status too when
    you assign something to yourself :)

    ------------------------------------------------------------------------

    [2008-09-04 17:29:21] phpbugs at colin dot guthr dot ie

    Description:
    ------------
    With libxml2 2.7.1, When using the expat type xml parsing routines in
    PHP, the characater data seems to silently drop any encoded text e.g.
    &gt; &lt; and friends.

    Please see Mandriva bug for details:
    https://qa.mandriva.com/show_bug.cgi?id=43486

    And also please note the thread on the libxml mailing list:
    http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610

    And most notably the reply to the above thread:
    <quote>
    Can you report this as a PHP bug? It looks like some really old hack
    code in the PHP extension in order to mimic some specific expat
    functionality. The behavior change you see though resulting from a code
    changes in libxml2 is really due to the hackish code in the extension
    doing things it wasnt meant to be doing.
    </quote>

    Reproduce code:
    ---------------
    Please see this code:
    https://qa.mandriva.com/attachment.cgi?id=10757

    Expected result:
    ----------------
    <
    foo 
    wibble
    <
    /foo 


    Actual result:
    --------------
    foo
    wibble
    /foo



    ------------------------------------------------------------------------


    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    phpbugs Guest

  8. #8

    Default #45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Comment by: mike at kogan dot org
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    I also have run into this - we had some legacy php code on the
    xml_pr that was fine on some centos 4 servers with php4 and 5
    running apache 1.3. We've been debugging this failure for a day now on
    our new centos 5 server running php5 and libxml2 2.7.2, and we confirm
    the same problem. The characterHandler is not called for the known
    entities so scripts depending on this (rss feed converters etc) emit
    flawed html. I agree there's much better ways to p XML but this is
    legacy stuff thats somewhat pervasive and we didn;t choose what these
    folks used for their apps.

    I'd love to rebuild their server with an older libxml2 but am not sure
    how to go backwards without causing some other problem. Customer has
    cpanel/whm and all that hooey and I'd rather not create a mess on their
    new server.

    Hope ya'll fix this soon as it is an issue on the cpanel folks that
    have 2.7.2 in their stable branch for centos 5 that is being spread by
    their updater.

    If someone can give me a pointer that a straightup build and install of
    the old release code wont make things worse I'll take a crack at moving
    their server back.


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-10-08 09:50:16] phpbugs at colin dot guthr dot ie

    Yes, I suspect that the comments left by ptn at post dot cz are
    incorrect when they say it is fixed in libxml. rrichards has given a
    very complete explanation of the problem and it is more fundamental than
    a simple bug.

    Compiling PHP with libexpat is the correct workaround for now.

    ------------------------------------------------------------------------

    [2008-10-08 09:18:54] uraes at hot dot ee

    just tried libxml2-2.7.2 and 5.2.6-pl7-gentoo and it is still broken:

    Example PHP code:
    <?
    $data="<?xml version = '1.0' encoding = 'UTF-8'?>
    <rss version=\"2.0\" >
    <channel>
    <item>
    <description>&lt;a
    href=&quot;http://www.google.com&quot;>Google&lt;/a></description>
    </item>
    </channel>
    </rss>
    ";

    $pr = xml_pr_create('UTF-8');
    xml_pr_set_option($pr, XML_OPTION_SKIP_WHITE, 1);
    xml_p_into_struct($pr, $data, $vals, $index);
    xml_pr_free($pr);

    echo "<pre>";

    echo "<b>Original XML:</b><br>".htmlentities($data);

    echo "<br><br><b>Pd struct:</b><br>";
    print_r($vals);
    ?>

    ... pd result is "a href=http://www.google.com>Google/a>"

    ------------------------------------------------------------------------

    [2008-10-07 11:19:33] ptn at post dot cz

    this bug seems to be fixed in libxm2-2.7.2

    http://svn.gnome.org/viewvc/libxml2?view=revision&revision=3798

    ------------------------------------------------------------------------

    [2008-09-09 23:06:00] phpbugs at colin dot guthr dot ie

    Comments by Daniel Veillard on the libxml ML:

    The only thing I can think of is that libxml2 doesn't anymore ask
    though a SAX callback when looking for entities references if they
    are in the predefined set. This comes in essence by an old decision
    from the XML working group stating that user definition for those 5
    entities could not override the default predefined ones. So I guess
    that change is logical. Now what is done on top of SAX to result
    in that bug, I don't really know :-\

    ------------------------------------------------------------------------

    [2008-09-06 15:43:29] net

    Assigned to the maintainer (Rob, don't forget to change status too when
    you assign something to yourself :)

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://bugs.php.net/45996

    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    mike Guest

  9. #9

    Default #45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Comment by: phpbugs at colin dot guthr dot ie
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    Mike, it's fairly easy to recompile PHP with the libexpat library for
    the legacy XML parsing functions while keeping libxml2 for the more
    modern ones.

    We did that in the Mandriva package for our 2009.0 release after I
    reported the bug.

    See the SPEC file here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?revision=291141&view=markup

    The particular change that worked around it is here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?r1=278891&r2=281822

    I'm sure you can work out how to get the needed patch that is mentioned
    by navigating the webcvs :) You should be able to use this to recompile
    the CentOS PHP package accordingly.

    Hope this helps.

    Col


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-10-15 00:04:01] mike at kogan dot org

    I also have run into this - we had some legacy php code on the
    xml_pr that was fine on some centos 4 servers with php4 and 5
    running apache 1.3. We've been debugging this failure for a day now on
    our new centos 5 server running php5 and libxml2 2.7.2, and we confirm
    the same problem. The characterHandler is not called for the known
    entities so scripts depending on this (rss feed converters etc) emit
    flawed html. I agree there's much better ways to p XML but this is
    legacy stuff thats somewhat pervasive and we didn;t choose what these
    folks used for their apps.

    I'd love to rebuild their server with an older libxml2 but am not sure
    how to go backwards without causing some other problem. Customer has
    cpanel/whm and all that hooey and I'd rather not create a mess on their
    new server.

    Hope ya'll fix this soon as it is an issue on the cpanel folks that
    have 2.7.2 in their stable branch for centos 5 that is being spread by
    their updater.

    If someone can give me a pointer that a straightup build and install of
    the old release code wont make things worse I'll take a crack at moving
    their server back.

    ------------------------------------------------------------------------

    [2008-10-08 09:50:16] phpbugs at colin dot guthr dot ie

    Yes, I suspect that the comments left by ptn at post dot cz are
    incorrect when they say it is fixed in libxml. rrichards has given a
    very complete explanation of the problem and it is more fundamental than
    a simple bug.

    Compiling PHP with libexpat is the correct workaround for now.

    ------------------------------------------------------------------------

    [2008-10-08 09:18:54] uraes at hot dot ee

    just tried libxml2-2.7.2 and 5.2.6-pl7-gentoo and it is still broken:

    Example PHP code:
    <?
    $data="<?xml version = '1.0' encoding = 'UTF-8'?>
    <rss version=\"2.0\" >
    <channel>
    <item>
    <description>&lt;a
    href=&quot;http://www.google.com&quot;>Google&lt;/a></description>
    </item>
    </channel>
    </rss>
    ";

    $pr = xml_pr_create('UTF-8');
    xml_pr_set_option($pr, XML_OPTION_SKIP_WHITE, 1);
    xml_p_into_struct($pr, $data, $vals, $index);
    xml_pr_free($pr);

    echo "<pre>";

    echo "<b>Original XML:</b><br>".htmlentities($data);

    echo "<br><br><b>Pd struct:</b><br>";
    print_r($vals);
    ?>

    ... pd result is "a href=http://www.google.com>Google/a>"

    ------------------------------------------------------------------------

    [2008-10-07 11:19:33] ptn at post dot cz

    this bug seems to be fixed in libxm2-2.7.2

    http://svn.gnome.org/viewvc/libxml2?view=revision&revision=3798

    ------------------------------------------------------------------------

    [2008-09-09 23:06:00] phpbugs at colin dot guthr dot ie

    Comments by Daniel Veillard on the libxml ML:

    The only thing I can think of is that libxml2 doesn't anymore ask
    though a SAX callback when looking for entities references if they
    are in the predefined set. This comes in essence by an old decision
    from the XML working group stating that user definition for those 5
    entities could not override the default predefined ones. So I guess
    that change is logical. Now what is done on top of SAX to result
    in that bug, I don't really know :-\

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://bugs.php.net/45996

    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    phpbugs Guest

  10. #10

    Default #45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Comment by: mike at Kogan dot org
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    Thanks Col - unfortunately after thrashing on this for a day I either
    have gotten libexpat built in and it hasn't worked, or my efforts to
    build it into Apache2 have not worked. How can I tell once I've rebuilt
    apache whether it's in or not? Will it show up on phpinfo? I see
    libexpat.so on the system and configured apache --with-expat=builtin and
    tried using the expat on the system but I'm not sure if it's actually
    getting there. Sorry in advance if this is not the place to ask such a
    question but googling libexpat has not been fruitful.


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-10-15 09:02:54] phpbugs at colin dot guthr dot ie

    Mike, it's fairly easy to recompile PHP with the libexpat library for
    the legacy XML parsing functions while keeping libxml2 for the more
    modern ones.

    We did that in the Mandriva package for our 2009.0 release after I
    reported the bug.

    See the SPEC file here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?revision=291141&view=markup

    The particular change that worked around it is here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?r1=278891&r2=281822

    I'm sure you can work out how to get the needed patch that is mentioned
    by navigating the webcvs :) You should be able to use this to recompile
    the CentOS PHP package accordingly.

    Hope this helps.

    Col

    ------------------------------------------------------------------------

    [2008-10-15 00:04:01] mike at kogan dot org

    I also have run into this - we had some legacy php code on the
    xml_pr that was fine on some centos 4 servers with php4 and 5
    running apache 1.3. We've been debugging this failure for a day now on
    our new centos 5 server running php5 and libxml2 2.7.2, and we confirm
    the same problem. The characterHandler is not called for the known
    entities so scripts depending on this (rss feed converters etc) emit
    flawed html. I agree there's much better ways to p XML but this is
    legacy stuff thats somewhat pervasive and we didn;t choose what these
    folks used for their apps.

    I'd love to rebuild their server with an older libxml2 but am not sure
    how to go backwards without causing some other problem. Customer has
    cpanel/whm and all that hooey and I'd rather not create a mess on their
    new server.

    Hope ya'll fix this soon as it is an issue on the cpanel folks that
    have 2.7.2 in their stable branch for centos 5 that is being spread by
    their updater.

    If someone can give me a pointer that a straightup build and install of
    the old release code wont make things worse I'll take a crack at moving
    their server back.

    ------------------------------------------------------------------------

    [2008-10-08 09:50:16] phpbugs at colin dot guthr dot ie

    Yes, I suspect that the comments left by ptn at post dot cz are
    incorrect when they say it is fixed in libxml. rrichards has given a
    very complete explanation of the problem and it is more fundamental than
    a simple bug.

    Compiling PHP with libexpat is the correct workaround for now.

    ------------------------------------------------------------------------

    [2008-10-08 09:18:54] uraes at hot dot ee

    just tried libxml2-2.7.2 and 5.2.6-pl7-gentoo and it is still broken:

    Example PHP code:
    <?
    $data="<?xml version = '1.0' encoding = 'UTF-8'?>
    <rss version=\"2.0\" >
    <channel>
    <item>
    <description>&lt;a
    href=&quot;http://www.google.com&quot;>Google&lt;/a></description>
    </item>
    </channel>
    </rss>
    ";

    $pr = xml_pr_create('UTF-8');
    xml_pr_set_option($pr, XML_OPTION_SKIP_WHITE, 1);
    xml_p_into_struct($pr, $data, $vals, $index);
    xml_pr_free($pr);

    echo "<pre>";

    echo "<b>Original XML:</b><br>".htmlentities($data);

    echo "<br><br><b>Pd struct:</b><br>";
    print_r($vals);
    ?>

    ... pd result is "a href=http://www.google.com>Google/a>"

    ------------------------------------------------------------------------

    [2008-10-07 11:19:33] ptn at post dot cz

    this bug seems to be fixed in libxm2-2.7.2

    http://svn.gnome.org/viewvc/libxml2?view=revision&revision=3798

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://bugs.php.net/45996

    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    mike Guest

  11. #11

    Default #45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Comment by: mike at kogan dot org
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    Nevermind we got it - libexpat is in and workaround is fine. Thanks
    again and happy coding!


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-10-16 02:01:00] mike at Kogan dot org

    Thanks Col - unfortunately after thrashing on this for a day I either
    have gotten libexpat built in and it hasn't worked, or my efforts to
    build it into Apache2 have not worked. How can I tell once I've rebuilt
    apache whether it's in or not? Will it show up on phpinfo? I see
    libexpat.so on the system and configured apache --with-expat=builtin and
    tried using the expat on the system but I'm not sure if it's actually
    getting there. Sorry in advance if this is not the place to ask such a
    question but googling libexpat has not been fruitful.

    ------------------------------------------------------------------------

    [2008-10-15 09:02:54] phpbugs at colin dot guthr dot ie

    Mike, it's fairly easy to recompile PHP with the libexpat library for
    the legacy XML parsing functions while keeping libxml2 for the more
    modern ones.

    We did that in the Mandriva package for our 2009.0 release after I
    reported the bug.

    See the SPEC file here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?revision=291141&view=markup

    The particular change that worked around it is here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?r1=278891&r2=281822

    I'm sure you can work out how to get the needed patch that is mentioned
    by navigating the webcvs :) You should be able to use this to recompile
    the CentOS PHP package accordingly.

    Hope this helps.

    Col

    ------------------------------------------------------------------------

    [2008-10-15 00:04:01] mike at kogan dot org

    I also have run into this - we had some legacy php code on the
    xml_pr that was fine on some centos 4 servers with php4 and 5
    running apache 1.3. We've been debugging this failure for a day now on
    our new centos 5 server running php5 and libxml2 2.7.2, and we confirm
    the same problem. The characterHandler is not called for the known
    entities so scripts depending on this (rss feed converters etc) emit
    flawed html. I agree there's much better ways to p XML but this is
    legacy stuff thats somewhat pervasive and we didn;t choose what these
    folks used for their apps.

    I'd love to rebuild their server with an older libxml2 but am not sure
    how to go backwards without causing some other problem. Customer has
    cpanel/whm and all that hooey and I'd rather not create a mess on their
    new server.

    Hope ya'll fix this soon as it is an issue on the cpanel folks that
    have 2.7.2 in their stable branch for centos 5 that is being spread by
    their updater.

    If someone can give me a pointer that a straightup build and install of
    the old release code wont make things worse I'll take a crack at moving
    their server back.

    ------------------------------------------------------------------------

    [2008-10-08 09:50:16] phpbugs at colin dot guthr dot ie

    Yes, I suspect that the comments left by ptn at post dot cz are
    incorrect when they say it is fixed in libxml. rrichards has given a
    very complete explanation of the problem and it is more fundamental than
    a simple bug.

    Compiling PHP with libexpat is the correct workaround for now.

    ------------------------------------------------------------------------

    [2008-10-08 09:18:54] uraes at hot dot ee

    just tried libxml2-2.7.2 and 5.2.6-pl7-gentoo and it is still broken:

    Example PHP code:
    <?
    $data="<?xml version = '1.0' encoding = 'UTF-8'?>
    <rss version=\"2.0\" >
    <channel>
    <item>
    <description>&lt;a
    href=&quot;http://www.google.com&quot;>Google&lt;/a></description>
    </item>
    </channel>
    </rss>
    ";

    $pr = xml_pr_create('UTF-8');
    xml_pr_set_option($pr, XML_OPTION_SKIP_WHITE, 1);
    xml_p_into_struct($pr, $data, $vals, $index);
    xml_pr_free($pr);

    echo "<pre>";

    echo "<b>Original XML:</b><br>".htmlentities($data);

    echo "<br><br><b>Pd struct:</b><br>";
    print_r($vals);
    ?>

    ... pd result is "a href=http://www.google.com>Google/a>"

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://bugs.php.net/45996

    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    mike Guest

  12. #12

    Default #45996 [Asn]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Updated by: net
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    So far as I can tell the only problem here is that libxml2 is bailing
    in pr.c:xmlPReference() because the ctxt->wellFormed flag is
    cleared. It is set to zero by compat.c, which seems simply wrong;
    xmlCreate*PrContext initialize it to non-zero.

    If I apply this patch it works fine:

    http://people.apache.org/~jorton/php-5.2.6-xmlwformed.patch

    Rob?


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-10-16 14:56:03] mike at kogan dot org

    Nevermind we got it - libexpat is in and workaround is fine. Thanks
    again and happy coding!

    ------------------------------------------------------------------------

    [2008-10-16 02:01:00] mike at Kogan dot org

    Thanks Col - unfortunately after thrashing on this for a day I either
    have gotten libexpat built in and it hasn't worked, or my efforts to
    build it into Apache2 have not worked. How can I tell once I've rebuilt
    apache whether it's in or not? Will it show up on phpinfo? I see
    libexpat.so on the system and configured apache --with-expat=builtin and
    tried using the expat on the system but I'm not sure if it's actually
    getting there. Sorry in advance if this is not the place to ask such a
    question but googling libexpat has not been fruitful.

    ------------------------------------------------------------------------

    [2008-10-15 09:02:54] phpbugs at colin dot guthr dot ie

    Mike, it's fairly easy to recompile PHP with the libexpat library for
    the legacy XML parsing functions while keeping libxml2 for the more
    modern ones.

    We did that in the Mandriva package for our 2009.0 release after I
    reported the bug.

    See the SPEC file here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?revision=291141&view=markup

    The particular change that worked around it is here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?r1=278891&r2=281822

    I'm sure you can work out how to get the needed patch that is mentioned
    by navigating the webcvs :) You should be able to use this to recompile
    the CentOS PHP package accordingly.

    Hope this helps.

    Col

    ------------------------------------------------------------------------

    [2008-10-15 00:04:01] mike at kogan dot org

    I also have run into this - we had some legacy php code on the
    xml_pr that was fine on some centos 4 servers with php4 and 5
    running apache 1.3. We've been debugging this failure for a day now on
    our new centos 5 server running php5 and libxml2 2.7.2, and we confirm
    the same problem. The characterHandler is not called for the known
    entities so scripts depending on this (rss feed converters etc) emit
    flawed html. I agree there's much better ways to p XML but this is
    legacy stuff thats somewhat pervasive and we didn;t choose what these
    folks used for their apps.

    I'd love to rebuild their server with an older libxml2 but am not sure
    how to go backwards without causing some other problem. Customer has
    cpanel/whm and all that hooey and I'd rather not create a mess on their
    new server.

    Hope ya'll fix this soon as it is an issue on the cpanel folks that
    have 2.7.2 in their stable branch for centos 5 that is being spread by
    their updater.

    If someone can give me a pointer that a straightup build and install of
    the old release code wont make things worse I'll take a crack at moving
    their server back.

    ------------------------------------------------------------------------

    [2008-10-08 09:50:16] phpbugs at colin dot guthr dot ie

    Yes, I suspect that the comments left by ptn at post dot cz are
    incorrect when they say it is fixed in libxml. rrichards has given a
    very complete explanation of the problem and it is more fundamental than
    a simple bug.

    Compiling PHP with libexpat is the correct workaround for now.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://bugs.php.net/45996

    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    jorton@php.net Guest

  13. #13

    Default #45996 [Asn]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Updated by: net
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    Changing the flag fixes internally defined entities, but breaks the
    rest
    of the entity handling.


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-10-17 13:40:27] net

    So far as I can tell the only problem here is that libxml2 is bailing
    in pr.c:xmlPReference() because the ctxt->wellFormed flag is
    cleared. It is set to zero by compat.c, which seems simply wrong;
    xmlCreate*PrContext initialize it to non-zero.

    If I apply this patch it works fine:

    http://people.apache.org/~jorton/php-5.2.6-xmlwformed.patch

    Rob?

    ------------------------------------------------------------------------

    [2008-10-16 14:56:03] mike at kogan dot org

    Nevermind we got it - libexpat is in and workaround is fine. Thanks
    again and happy coding!

    ------------------------------------------------------------------------

    [2008-10-16 02:01:00] mike at Kogan dot org

    Thanks Col - unfortunately after thrashing on this for a day I either
    have gotten libexpat built in and it hasn't worked, or my efforts to
    build it into Apache2 have not worked. How can I tell once I've rebuilt
    apache whether it's in or not? Will it show up on phpinfo? I see
    libexpat.so on the system and configured apache --with-expat=builtin and
    tried using the expat on the system but I'm not sure if it's actually
    getting there. Sorry in advance if this is not the place to ask such a
    question but googling libexpat has not been fruitful.

    ------------------------------------------------------------------------

    [2008-10-15 09:02:54] phpbugs at colin dot guthr dot ie

    Mike, it's fairly easy to recompile PHP with the libexpat library for
    the legacy XML parsing functions while keeping libxml2 for the more
    modern ones.

    We did that in the Mandriva package for our 2009.0 release after I
    reported the bug.

    See the SPEC file here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?revision=291141&view=markup

    The particular change that worked around it is here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?r1=278891&r2=281822

    I'm sure you can work out how to get the needed patch that is mentioned
    by navigating the webcvs :) You should be able to use this to recompile
    the CentOS PHP package accordingly.

    Hope this helps.

    Col

    ------------------------------------------------------------------------

    [2008-10-15 00:04:01] mike at kogan dot org

    I also have run into this - we had some legacy php code on the
    xml_pr that was fine on some centos 4 servers with php4 and 5
    running apache 1.3. We've been debugging this failure for a day now on
    our new centos 5 server running php5 and libxml2 2.7.2, and we confirm
    the same problem. The characterHandler is not called for the known
    entities so scripts depending on this (rss feed converters etc) emit
    flawed html. I agree there's much better ways to p XML but this is
    legacy stuff thats somewhat pervasive and we didn;t choose what these
    folks used for their apps.

    I'd love to rebuild their server with an older libxml2 but am not sure
    how to go backwards without causing some other problem. Customer has
    cpanel/whm and all that hooey and I'd rather not create a mess on their
    new server.

    Hope ya'll fix this soon as it is an issue on the cpanel folks that
    have 2.7.2 in their stable branch for centos 5 that is being spread by
    their updater.

    If someone can give me a pointer that a straightup build and install of
    the old release code wont make things worse I'll take a crack at moving
    their server back.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://bugs.php.net/45996

    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    rrichards@php.net Guest

  14. #14

    Default #45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_p()

    ID: 45996
    Comment by: markus dot gevers at contenit dot de
    Reported By: phpbugs at colin dot guthr dot ie
    Status: Assigned
    Bug Type: XML related
    Operating System: Mandriva Linux
    PHP Version: 5.2.6
    Assigned To: rrichards
    New Comment:

    Hallo,

    is there a solution yet?

    I have the same problem on Fedora Core 9.
    I also have this problem using libxml2-2.6.32

    Can anyone help me?

    Best regards,
    Markus


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-10-17 14:08:57] net

    Changing the flag fixes internally defined entities, but breaks the
    rest
    of the entity handling.

    ------------------------------------------------------------------------

    [2008-10-17 13:40:27] net

    So far as I can tell the only problem here is that libxml2 is bailing
    in pr.c:xmlPReference() because the ctxt->wellFormed flag is
    cleared. It is set to zero by compat.c, which seems simply wrong;
    xmlCreate*PrContext initialize it to non-zero.

    If I apply this patch it works fine:

    http://people.apache.org/~jorton/php-5.2.6-xmlwformed.patch

    Rob?

    ------------------------------------------------------------------------

    [2008-10-16 14:56:03] mike at kogan dot org

    Nevermind we got it - libexpat is in and workaround is fine. Thanks
    again and happy coding!

    ------------------------------------------------------------------------

    [2008-10-16 02:01:00] mike at Kogan dot org

    Thanks Col - unfortunately after thrashing on this for a day I either
    have gotten libexpat built in and it hasn't worked, or my efforts to
    build it into Apache2 have not worked. How can I tell once I've rebuilt
    apache whether it's in or not? Will it show up on phpinfo? I see
    libexpat.so on the system and configured apache --with-expat=builtin and
    tried using the expat on the system but I'm not sure if it's actually
    getting there. Sorry in advance if this is not the place to ask such a
    question but googling libexpat has not been fruitful.

    ------------------------------------------------------------------------

    [2008-10-15 09:02:54] phpbugs at colin dot guthr dot ie

    Mike, it's fairly easy to recompile PHP with the libexpat library for
    the legacy XML parsing functions while keeping libxml2 for the more
    modern ones.

    We did that in the Mandriva package for our 2009.0 release after I
    reported the bug.

    See the SPEC file here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?revision=291141&view=markup

    The particular change that worked around it is here:
    http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/current/SPECS/php.spec?r1=278891&r2=281822

    I'm sure you can work out how to get the needed patch that is mentioned
    by navigating the webcvs :) You should be able to use this to recompile
    the CentOS PHP package accordingly.

    Hope this helps.

    Col

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://bugs.php.net/45996

    --
    Edit this bug report at http://bugs.php.net/?id=45996&edit=1

    markus Guest

Similar Threads

  1. [xml] character data
    By Decapode in forum PHP Development
    Replies: 3
    Last Post: October 28th, 08:57 AM
  2. string data transfer problem through network (libxml2)
    By Eric in forum UNIX Programming
    Replies: 2
    Last Post: September 10th, 02:28 AM
  3. file associations in MacOS X; breakage?
    By Henry in forum Mac Applications & Software
    Replies: 2
    Last Post: July 9th, 09:34 PM
  4. problem with xml character data
    By dmassie in forum PHP Development
    Replies: 0
    Last Post: July 4th, 11:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139