#49938 [NEW]: Phar::startBuffering() didn't work. After this isBuffering() returns false.
| From: | nodkz at mail dot ru | Date: | Wed, 21 Oct 2009 07:57:23 +0000 |
| Subject: | #49938 [NEW]: Phar::startBuffering() didn't work. After this isBuffering() returns false. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-143746@lists.php.net to get a copy of this message | ||
From: nodkz at mail dot ru
Operating system: Windows XP
PHP version: 5.3.1RC2
PHP Bug Type: PHAR related
Bug description: Phar::startBuffering() didn't work. After this isBuffering() returns false.
Description:
------------
I need add 100 000 files to phar arhive.
First 1000 files insert very quick. But when I insert from 9000 to 10000,
it works about 20 minutes.
I found that every changes writes to disk. In documentation I so buffering
operation to maket set of change, before writing to disk. If I run
startBuffering()/stopBuffering() commands.
So I try to run startBuffering() on PHP 5.2.11 - it doesn't work.
So I install PHP5.3.1RC2 - it doesn't work again.
Reproduce code:
---------------
$phar = new Phar('test.phar');
$phar->startBuffering();
var_dump($phar->isBuffering());
for($i=0;$i<100000;$i++) {
// write data in files XXX/XXX.txt
$phar->addFromString( floor($i/1000).'/'.($i%1000).'txt', 'some
data');
}
$phar->stopBuffering();
Expected result:
----------------
Expect to see
bool(true)
Actual result:
--------------
But scripts shows:
bool(false)
--
Edit bug report at http://bugs.php.net/?id=49938&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49938&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49938&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49938&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49938&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49938&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49938&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49938&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49938&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49938&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49938&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49938&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49938&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49938&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49938&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49938&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49938&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49938&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49938&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49938&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49938&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49938&r=mysqlcfg