Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45577 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85927 invoked from network); 16 Sep 2009 09:15:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2009 09:15:00 -0000 Authentication-Results: pb1.pair.com header.from=ian.tighe@latitude-51.co.uk; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ian.tighe@latitude-51.co.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain latitude-51.co.uk designates 80.235.207.146 as permitted sender) X-PHP-List-Original-Sender: ian.tighe@latitude-51.co.uk X-Host-Fingerprint: 80.235.207.146 pluto.renegade-hosting.co.uk Received: from [80.235.207.146] ([80.235.207.146:33978] helo=pluto.renegade-hosting.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/87-39049-39CA0BA4 for ; Wed, 16 Sep 2009 05:15:00 -0400 Received: from localhost (unknown [127.0.0.1]) by pluto.renegade-hosting.co.uk (Postfix) with ESMTP id 97B78AF03A7 for ; Wed, 16 Sep 2009 09:14:56 +0000 (UTC) X-Virus-Scanned: Scanned by Consulting Ian Tighe @ renegade-hosting.co.uk Received: from pluto.renegade-hosting.co.uk ([127.0.0.1]) by localhost (pluto.renegade-hosting.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LyCPvLY17Ffx for ; Wed, 16 Sep 2009 10:14:55 +0100 (BST) Received: from saturn (saturn.renegade-hosting.co.uk [192.168.0.2]) by pluto.renegade-hosting.co.uk (Postfix) with SMTP id 466D1AF0135 for ; Wed, 16 Sep 2009 10:14:55 +0100 (BST) Message-ID: <3A8BE18A46C746E69582175E92E503AC@saturn> To: Date: Wed, 16 Sep 2009 10:14:55 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_005A_01CA36B6.897FC3C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Subject: Detecting share violations over cifs with PHP? Feature request From: ian.tighe@latitude-51.co.uk ("Ian Tighe") ------=_NextPart_000_005A_01CA36B6.897FC3C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi. I hope this has been sent to the right place. I am using files that are mount.cif share files. My client is a samba = linux box but acting as a client over cifs to an XP box (several in = fact).=20 I am descending the share recursively with opendir and readdir detecting = files ( and of course directories ) before doing my processing. I note from a wireshark trace I am getting errors - sharing violations = reported by XP. I would very much like to detect these events to take = action - ignore the file for instance - but right now I have a true or = false return from readdir, is_dir, is_file or is_link which is not very = helpful during a fault condition such as a sharing violation. In other = words a sharing violation looks like a readdir saying no more files! It seems that once the error condition comes about all my reads of a = directory and tests of file types fail until I reach the end of that = directory and all of its parent directories. This is not so good. Am I missing a trick here? If not is it possible to bring out more error = information so that I can detect these events. An error array as an = additional overloaded argument to readdir, opendir (indeed any I/O) = where the first element has the normal true/false perhaps but a second = element has a return code for smb/cifs/file_system failure/error/warning = condition? Thanks Ian ------=_NextPart_000_005A_01CA36B6.897FC3C0--