|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-22 18:17 UTC] greg at chiaraquartet dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Mar 04 23:00:02 2026 UTC |
Description: ------------ I have a Phar file with the given stub code. This code is accessed by an ajax script several times per minute. Sometimes (randomly) the method getMetadata() returns null instead the stored metadata. I think that it's a kind of race condition because if I append a usleep(50) before execute the getMetaData() method, works. Reproduce code: --------------- <?php try { $__phar = new Phar(__FILE__); $m = $__phar->getMetaData(); require 'phar://' . __FILE__ . '/' . $m['bootstrap']; } catch ( PharException $e ) { echo $e->getMessage(); die('Fatal error while initializing package ' . basename(__FILE__)); } __HALT_COMPILER();