[PHP-BUG] Bug #61453 [NEW]: SplObjectStorage does not identify objects correctly
From: Operating system: Linux PHP version: 5.4.0 Package: SPL related Bug Type: Bug Bug description:SplObjectStorage does not identify objects correctly Description: When I have a large collection of objects stored in a SplObjectStorage it starts to behave strange. It says that an object already exists in the storage and returns the stored data for another object. Test script: --- $limit = 1000; $objects = new SplObjectStorage; for($i = 0; $i < $limit; $i++){ $object = new StdClass; if(isset($objects[$object])){ die("this should never happen, but did after $i iteration"); } $objects[$object] = 1; } echo "\nfinished\n"; Expected result: The script should never enter the if condition and die, because the object has not been added to the object storage yet Actual result: -- The scripts dies because of it finding an object in the storage that should not have been there. This happens at random iteration, i'm guessing based on memory usage or something. -- Edit bug report at https://bugs.php.net/bug.php?id=61453&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61453&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61453&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61453&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61453&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61453&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61453&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61453&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61453&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61453&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61453&r=support Expected behavior: https://bugs.php.net/fix.php?id=61453&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61453&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61453&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61453&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61453&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61453&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61453&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61453&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61453&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61453&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61453&r=mysqlcfg
#50767 [NEW]: XMLReader does not accept zip stream
From: jhgundersen at gmail dot com Operating system: Ubuntu 9.10 PHP version: 5.3.1 PHP Bug Type: Streams related Bug description: XMLReader does not accept zip stream Description: XMLReader has stopped working with zip streams. It easy to reproduce: Make a zip file named test.zip with a single file named test.xml Reproduce code: --- echo file_get_contents('zip://test.zip#test.xml'); $reader = new XMLReader() $reader->open('zip://test.zip#test.xml'); 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 -- Edit bug report at http://bugs.php.net/?id=50767&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50767&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50767&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50767&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50767&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50767&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50767&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50767&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50767&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50767&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50767&r=support Expected behavior: http://bugs.php.net/fix.php?id=50767&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50767&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50767&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50767&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50767&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50767&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50767&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50767&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50767&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50767&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50767&r=mysqlcfg
#50767 [Fbk->Opn]: XMLReader does not accept zip stream
ID: 50767 User updated by: jhgundersen at gmail dot com Reported By: jhgundersen at gmail dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: Ubuntu 9.10 PHP Version: 5.3.1 New Comment: Zip stream works with file_get_contents, I can open the test.xml with zip archive Previous Comments: [2010-01-15 14:34:27] johan...@php.net Are you sure you have the zip extension loaded? [2010-01-15 14:30:13] jhgundersen at gmail dot com Description: XMLReader has stopped working with zip streams. It easy to reproduce: Make a zip file named test.zip with a single file named test.xml Reproduce code: --- echo file_get_contents('zip://test.zip#test.xml'); $reader = new XMLReader() $reader->open('zip://test.zip#test.xml'); 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 -- Edit this bug report at http://bugs.php.net/?id=50767&edit=1
#50767 [Fbk->Opn]: XMLReader does not accept zip stream
ID: 50767 User updated by: jhgundersen at gmail dot com Reported By: jhgundersen at gmail dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: Ubuntu 9.10 PHP Version: 5.3.1 Assigned To: pajoye New Comment: the zip extension is loaded: Zip: enabled Extension Version: $Id: php_zip.c,v 1.1.2.38.2.29 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. Previous Comments: [2010-01-18 17:32:53] paj...@php.net 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-15 15:19:49] jhgundersen at gmail dot com Zip stream works with file_get_contents, I can open the test.xml with zip archive [2010-01-15 14:34:27] johan...@php.net Are you sure you have the zip extension loaded? [2010-01-15 14:30:13] jhgundersen at gmail dot com Description: XMLReader has stopped working with zip streams. It easy to reproduce: Make a zip file named test.zip with a single file named test.xml Reproduce code: --- echo file_get_contents('zip://test.zip#test.xml'); $reader = new XMLReader() $reader->open('zip://test.zip#test.xml'); 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 -- Edit this bug report at http://bugs.php.net/?id=50767&edit=1
#50767 [Opn]: XMLReader does not accept zip stream
ID: 50767 User updated by: jhgundersen at gmail dot com Reported By: jhgundersen at gmail dot com Status: Open Bug Type: Streams related Operating System: Ubuntu 9.10 PHP Version: 5.3.1 Assigned To: pajoye New Comment: And it happens with every zip file I've tried. Previous Comments: [2010-01-19 08:21:00] jhgundersen at gmail dot com the zip extension is loaded: Zip: enabled Extension Version: $Id: php_zip.c,v 1.1.2.38.2.29 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-18 17:32:53] paj...@php.net 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-15 15:19:49] jhgundersen at gmail dot com Zip stream works with file_get_contents, I can open the test.xml with zip archive [2010-01-15 14:34:27] johan...@php.net Are you sure you have the zip extension loaded? [2010-01-15 14:30:13] jhgundersen at gmail dot com Description: XMLReader has stopped working with zip streams. It easy to reproduce: Make a zip file named test.zip with a single file named test.xml Reproduce code: --- echo file_get_contents('zip://test.zip#test.xml'); $reader = new XMLReader() $reader->open('zip://test.zip#test.xml'); 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 -- Edit this bug report at http://bugs.php.net/?id=50767&edit=1
#50767 [Fbk->Opn]: XMLReader does not accept zip stream
ID: 50767 User updated by: jhgundersen at gmail dot com Reported By: jhgundersen at gmail dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: Ubuntu 9.10 PHP Version: 5.3.1 Assigned To: rrichards New Comment: phpinfo gives me: libxml Version 2.7.3 Previous Comments: [2010-01-19 12:05:14] rricha...@php.net What version of libxml2 are you using? [2010-01-19 09:36:31] paj...@php.net 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 08:27:02] jhgundersen at gmail dot com And it happens with every zip file I've tried. [2010-01-19 08:21:00] jhgundersen at gmail dot com the zip extension is loaded: Zip: enabled Extension Version: $Id: php_zip.c,v 1.1.2.38.2.29 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-18 17:32:53] paj...@php.net 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. 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/50767 -- Edit this bug report at http://bugs.php.net/?id=50767&edit=1
#50767 [Fbk->Opn]: XMLReader does not accept zip stream
ID: 50767 User updated by: jhgundersen at gmail dot com Reported By: jhgundersen at gmail dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: Ubuntu 9.10 PHP Version: 5.3.1 Assigned To: rrichards New Comment: 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. Previous Comments: [2010-01-23 11:32:51] rricha...@php.net 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-21 10:07:51] j...@php.net Rob, feedback was given. [2010-01-19 12:22:18] jhgundersen at gmail dot com phpinfo gives me: libxml Version 2.7.3 [2010-01-19 12:05:14] rricha...@php.net What version of libxml2 are you using? [2010-01-19 09:36:31] paj...@php.net 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. 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/50767 -- Edit this bug report at http://bugs.php.net/?id=50767&edit=1