|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50767 XMLReader does not accept zip stream
Submitted: 2010-01-15 14:30 UTC Modified: 2010-01-25 10:43 UTC
From: jhgundersen at gmail dot com Assigned: rrichards (profile)
Status: Not a bug Package: Streams related
PHP Version: 5.3.1 OS: Ubuntu 9.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jhgundersen at gmail dot com
New email:
PHP Version: OS:


 [2010-01-15 14:30 UTC] jhgundersen at gmail dot com
XMLReader has stopped working with zip streams. 

It easy to reproduce:

Make a zip file named with a single file named test.xml

Reproduce code:
echo file_get_contents('zip://');

$reader = new XMLReader()

Expected result:
output of test.xml and no crash from xmlreader

Actual result:
output from test.xml is ok, but xmlreader crashes with:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-15 14:34 UTC]
Are you sure you have the zip extension loaded?
 [2010-01-15 15:19 UTC] jhgundersen at gmail dot com
Zip stream works with file_get_contents, I can open the test.xml with zip archive
 [2010-01-18 17:32 UTC]
It works just fine here. It is rather expected as both file_get_contents and xmlreader use the exact same code to read a zip entry.

Please provide a link to the archive you use for this test or double check that you actually load the zip extension for this test.
 [2010-01-19 08:21 UTC] jhgundersen at gmail dot com
the zip extension is loaded:

Zip: enabled 
Extension Version: $Id: php_zip.c,v 2009/02/24 23:55:14 iliaa Exp $ 
Zip version: 	1.9.1 
Libzip version: 	0.9.0

I totally agree that it is weird that the zip protocol seems to be working everywhere else but with xmlreader.
 [2010-01-19 08:27 UTC] jhgundersen at gmail dot com
And it happens with every zip file I've tried.
 [2010-01-19 09:36 UTC]
Richard, can you take a look please? Maybe it will ring a bell? libxml stream bug or smtg else, but I can't reproduce it here, on unix (ubuntu 9.10) or win.
 [2010-01-19 12:05 UTC]
What version of libxml2 are you using?
 [2010-01-19 12:22 UTC] jhgundersen at gmail dot com
phpinfo gives me: 
libxml Version 	2.7.3
 [2010-01-21 10:07 UTC]
Rob, feedback was given.
 [2010-01-23 11:32 UTC]
Check all your error logs to see if anything unexpected happened. I also  
cannot reproduce this. Have tried it on 3 different OSs and it has 
worked properly on each
 [2010-01-25 10:38 UTC] jhgundersen at gmail dot com
I can't see anything of interests in the logs.

I'm using the Zend Server CE solution to install php on my ubuntu machines and then it seems to be something wrong in that package since I can reproduce the bug on all of my testmachines, but you guys cannot reproduce this bug at all.
 [2010-01-25 10:43 UTC]
Please ask support from Zend for Zend products.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 20:01:29 2024 UTC