Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64504 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42955 invoked from network); 3 Jan 2013 16:00:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2013 16:00:28 -0000 Authentication-Results: pb1.pair.com header.from=steveh@brendata.co.uk; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=steveh@brendata.co.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain brendata.co.uk designates 109.170.137.202 as permitted sender) X-PHP-List-Original-Sender: steveh@brendata.co.uk X-Host-Fingerprint: 109.170.137.202 unknown Linux 2.6 Received: from [109.170.137.202] ([109.170.137.202:61251] helo=dell.brendata.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/C9-35624-91BA5E05 for ; Thu, 03 Jan 2013 11:00:27 -0500 Received: from prodntsc2.brendata (prodntsc2.brendata [193.195.25.41]) by dell.brendata.co.uk (8.14.1/8.14.1) with SMTP id r03G0L8D027908 for ; Thu, 3 Jan 2013 16:00:21 GMT Received: From PRODNTSC2.BRENDATA.CO.UK (193.195.25.41[193.195.25.41 port:64327]) by prodntsc2.brendata Mail essentials (server 2.422) with SMTP id: <1461@prodntsc2.brendata> for ; Thu, 3 Jan 2013 3:59:49 PM +0000 smtpmailfrom Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CDE9CB.5BF33885" X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Thu, 3 Jan 2013 15:59:48 -0000 Message-ID: <6B8895CA39846F4DB78FAE7979D9D77EB41E96@prodntsc2.brendata> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: zip stream looping issue Thread-Index: Ac3py1tppJzu7WWGQyu2xAsktNd0Tg== To: Subject: zip stream looping issue From: steveh@brendata.co.uk ("Steve Hanselman") ------_=_NextPart_001_01CDE9CB.5BF33885 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Before I look into this further, can someone confirm that fopen on a zi= p stream should return something other than a null? I've a zip called test.zip which contains 5 files, a.txt,b.txt,c.txt,d.txt and yes, e.txt The zip is valid and can be unzipped using unzip on linux. Running the following code returns a null for each of the pointers read= s the first and 2nd files and finally loops somewhere in the fgets code a= t 100% cpu at the end of b.txt:- $names=3Darray('a.txt', 'b.txt', 'c.txt', 'd.txt', 'e.txt'); foreach($names as $name) { $fp=3Dfopen('zip:///tmp/test.zip#'.$name,'r'); echo $name.':'.var_export($fp)."\n"; while(!feof($fp)) { $r=3Dfgets($fp); echo '.'; }; fclose($fp); }; The information contained in this email is intended for the personal an= d confidential use of the addressee only. It may also be privileged information. If you ar= e not the intended recipient then you are hereby notified that you have received this docu= ment in error and that any review, distribution or copying of this document is strictly p= rohibited. If you have received this communication in error, please notify Brendata immediate= ly on: +44 (0)1268 466100, or email 'technical@brendata.co.uk' Brendata (UK) Ltd Nevendon Hall, Nevendon Road, Basildon, Essex. SS13 1BX UK Registered Office as above. Registered in England No. 2764339 See our current vacancies at www.brendata.co.uk ------_=_NextPart_001_01CDE9CB.5BF33885--