php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61957 XMLReader::open(): Unable to open source data i
Submitted: 2012-05-06 01:15 UTC Modified: 2013-10-03 12:30 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: dean dot sanderson at 3dgroupuk dot com Assigned:
Status: Not a bug Package: XML Reader
PHP Version: 5.3.12 OS: Windows
Private report: No CVE-ID: None
 [2012-05-06 01:15 UTC] dean dot sanderson at 3dgroupuk dot com
Description:
------------
It seems this function doesn't like long url's

$z = new XMLReader;
$z->open("http://images.gwales.com/cgi-bin/xmlif?userid=1&password=canolfan&sql=SELECT * FROM (SELECT isbn, price_vat,pub_code,available,title,author,publication_date,link_to_marketing,medium,prod_lang_code,c1.CATEGORY_DESCRIPTION text_category,c2.CATEGORY_DESCRIPTION text_sub_category,DESC1,DESC2,PROD_SIZE,PAGES, row_number() OVER (ORDER BY ISBN) rn FROM PRODUCTS, CATEGORIES c1, CATEGORIES c2 WHERE INVALID='N' AND ORDER_ALLOWED_OME='Y' AND c1.CATEGORY=PRODUCTS.CATEGORY AND c2.CATEGORY=PRODUCTS.SUB_CATEGORY) WHERE rn BETWEEN 1 and 10 ORDER BY rn");

returns
XMLReader::open(): Unable to open source data 

this error has started to apear since upgrading from php 5.2 to 5.3

Test script:
---------------
Tried
 $z = new XMLReader;
$z->open("http://www.w3schools.com/xml/cd_catalog.xml");

works fine.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-06 10:44 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2012-05-06 10:44 UTC] pajoye@php.net
Encode the URI correctly and it should work fine.
 [2012-05-06 14:05 UTC] dean dot sanderson at 3dgroupuk dot com
Sorry i did try this before. But to double check i did it again using urlencode. Still the same error.

Url give was:
http://images.gwales.com/cgi-bin/xmlif?userid=1&password=canolfan&sql=SELECT%20*%20FROM%20(SELECT%20isbn,%20price_vat,pub_code,available,title,author,publication_date,link_to_marketing,medium,prod_lang_code,c1.CATEGORY_DESCRIPTION%20text_category,c2.CATEGORY_DESCRIPTION%20text_sub_category,DESC1,DESC2,PROD_SIZE,PAGES,%20row_number()%20OVER%20(ORDER%20BY%20ISBN)%20rn%20FROM%20PRODUCTS,%20CATEGORIES%20c1,%20CATEGORIES%20c2%20WHERE%20INVALID='N'%20AND%20ORDER_ALLOWED_OME='Y'%20AND%20c1.CATEGORY=PRODUCTS.CATEGORY%20AND%20c2.CATEGORY=PRODUCTS.SUB_CATEGORY)%20WHERE%20rn%20BETWEEN%201%20and%2050000%20ORDER%20BY%20rn
 [2012-05-06 14:05 UTC] dean dot sanderson at 3dgroupuk dot com
-Status: Feedback +Status: Open
 [2013-10-03 12:30 UTC] mike@php.net
-Status: Open +Status: Not a bug
 [2013-10-03 12:30 UTC] mike@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Dec 01 06:01:23 2020 UTC