#47754 [NEW]: array URL returning no parameter separater
| From: | itawadh at live dot com | Date: | Mon, 23 Mar 2009 14:30:55 +0000 |
| Subject: | #47754 [NEW]: array URL returning no parameter separater | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-135018@lists.php.net to get a copy of this message | ||
From: itawadh at live dot com
Operating system: Linux
PHP version: 5.2.9
PHP Bug Type: Output Control
Bug description: array URL returning no parameter separater
Description:
------------
Hi,
We enter a url in xml_parser functions to read and convert xml to php.
Everything seems to be working fine.
But, the Array output contains some urls as values (with url_parameters)
like http : // abc dot com / 123?ty=243&tt=564 ... etc.
Problem is that, when parsing it, we are getting url as string without the
& for parameters (so, the above sample is now http : // abc dot com /
123?ty=243tt=564)<- note here, an & is missing among the 243 and tt.
Please see to it and lemme update on this bug.
Reproduce code:
---------------
(here $xmldata is the xml generated with url :
http://publisher.api.shopping.com/publisher/3.0/rest/GeneralSearch?apiKey=MY_API_KEY&trackingId=MY_TRACKING_ID&productId=21267326&offerSortType=price&offerSortOrder=asc&showProductSpecs=true)
$parser = xml_parser_create ('ISO-8859-1');
xml_parser_set_option ($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parser_set_option ($parser, XML_OPTION_CASE_FOLDING, 0);
if (!xml_parse_into_struct ($parser, $xmldata, $vals, $index)) {
$xmlreaderror = true;
echo "error";
}
xml_parser_free ($parser);
now if I print the $vals, it has some urls in it that have problems.
Expected result:
----------------
I need the & to appear as parameter separator in URLs returned as array.
Actual result:
--------------
[11] => Array
(
[tag] => sourceURL
[type] => complete
[level] => 3
[value] =>
http://www999.shopping.com/pixel/noscript?PV_EvnTyp=APPVAPPV_APITSP=03%2F23%2F09_10%3A25%3A18_AMAPPV_DSPRQSID=s7.7b1f10c892d0e6c44bcbAPPV_IMGURL=APPV_LI_LNKINID=8053368APPV_LI_SBMKYW=APPV_MTCTYP=1000APPV_PRTID=144579APPV_BrnID=14305
)
this [value] us not containing any & in url
--
Edit bug report at http://bugs.php.net/?id=47754&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47754&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47754&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47754&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47754&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47754&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47754&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47754&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47754&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47754&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47754&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47754&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47754&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47754&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47754&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47754&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47754&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47754&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47754&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47754&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47754&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47754&r=mysqlcfg