From: dzuelke at gmail dot com Operating system: irrelevant PHP version: Irrelevant Package: PECL website Bug Type: Bug Bug description:PECL REST channel returns invalid XML
Description: ------------ Same again as #58446, #59098, #59666... Several endpoints in the API return invalid XML, the issue is always the same: weird XML prolog and extra elements in the middle of the document; sometimes just one more time, sometimes more, e.g. one in Authentication, three in Caching: ... <pi> <p><n>PAM</n> <c>pecl.php.net</c> <ca xlink:href="/rest/c/Authentication">Authentication</ca> <l>PHP</l> <s>PAM integration</s> <d>This extension provides PAM (Pluggable Authentication Modules) integration. PAM is a system of libraries that handle the authentication tasks of applications and services. The library provides a stable API for applications to defer to for authentication tasks.</d> <r xlink:href="/rest/r/pam"/> </p><?xml version="1.0" encoding="UTF-8" ?> <a xmlns="http://pear.php.net/dtd/rest.allreleases" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://pear.php.net/dtd/rest.allreleases http://pear.php.net/dtd/rest.allreleases.xsd"> <p>pam</p> <c>pecl.php.net</c> <r><v>1.0.3</v><s>stable</s></r> <r><v>1.0.2</v><s>stable</s></r> <r><v>1.0.1</v><s>stable</s></r> <r><v>1.0.0</v><s>stable</s></r> </a> The test script below outputs the number of XML prologs for each category that has more than one in the XML. Test script: --------------- for f in $(curl https://pecl.php.net/rest/c/categories.xml | grep -o 'c xlink:href="[^"]*' | cut -d'"' -f2 | sed 's/info.xml/packagesinfo.xml/' | sed s#^#https://pecl.php.net#); do { echo -n "$f: "; curl --silent $f | grep '<?xml' | wc -l; } | grep -v 1; done Actual result: -------------- https://pecl.php.net/rest/c/Authentication/packagesinfo.xml: 2 https://pecl.php.net/rest/c/Caching/packagesinfo.xml: 4 https://pecl.php.net/rest/c/Database/packagesinfo.xml: 2 https://pecl.php.net/rest/c/File%2BFormats/packagesinfo.xml: 2 https://pecl.php.net/rest/c/GUI/packagesinfo.xml: 2 https://pecl.php.net/rest/c/Images/packagesinfo.xml: 3 https://pecl.php.net/rest/c/Networking/packagesinfo.xml: 3 https://pecl.php.net/rest/c/Numbers/packagesinfo.xml: 2 https://pecl.php.net/rest/c/PHP/packagesinfo.xml: 2 https://pecl.php.net/rest/c/System/packagesinfo.xml: 2 https://pecl.php.net/rest/c/Text/packagesinfo.xml: 2 https://pecl.php.net/rest/c/Web%2BServices/packagesinfo.xml: 2 -- Edit bug report at https://bugs.php.net/bug.php?id=76719&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76719&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76719&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76719&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76719&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76719&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76719&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76719&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76719&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76719&r=support Expected behavior: https://bugs.php.net/fix.php?id=76719&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76719&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76719&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76719&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76719&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76719&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76719&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76719&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76719&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76719&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76719&r=mysqlcfg -- PECL development discussion Mailing List (http://pecl.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php