Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64702 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94670 invoked from network); 8 Jan 2013 21:06:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2013 21:06:51 -0000 Authentication-Results: pb1.pair.com header.from=nicolai.scheer@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nicolai.scheer@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.175 as permitted sender) X-PHP-List-Original-Sender: nicolai.scheer@gmail.com X-Host-Fingerprint: 74.125.82.175 mail-we0-f175.google.com Received: from [74.125.82.175] ([74.125.82.175:63666] helo=mail-we0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/B5-16636-96A8CE05 for ; Tue, 08 Jan 2013 16:06:50 -0500 Received: by mail-we0-f175.google.com with SMTP id z53so696235wey.6 for ; Tue, 08 Jan 2013 13:06:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tBBVCdg28thCa3253rtP+YJmfXp5p8ZnUVvyBOnkS7U=; b=r8BEKYHCgfo+ab6un7gGlv/TFR2uNOAd5Wi+zxqI/x0HBhyj1C6W5VTQ6RC1x0SyUH eWpHfTwgWv4WPt1xYjJZP0z9h6U1obh5wJwI95HkTWrM4KCFFBeWhR4RSufuhDTWofnj egvEyQSXrWHnjr09B/Rve55+hqz9kBxWvhmD+/eVgtWVf8DtLjNPp97KckfF34dRrAs9 5IXqfKcFN14/cAO6lc63lX4eNOcU+ZEIUotFOgR21QCz8v+xXy0KdpGx1oRAz5CSu8Lk W1G0OCuAO77uGXA53IHrCQNt2jhno0+xZXw4fFcRjjqxtKhl3a+DlzFWN5lvRKLzcaPQ UDog== MIME-Version: 1.0 Received: by 10.194.79.34 with SMTP id g2mr104350480wjx.17.1357679206518; Tue, 08 Jan 2013 13:06:46 -0800 (PST) Received: by 10.227.170.206 with HTTP; Tue, 8 Jan 2013 13:06:46 -0800 (PST) In-Reply-To: References: Date: Tue, 8 Jan 2013 22:06:46 +0100 Message-ID: To: Pierre Joye Cc: PHP internals Content-Type: multipart/alternative; boundary=047d7bb03eccd2cf8d04d2cd5236 Subject: Re: [PHP-DEV] File-Paths exceeding MAX_PATH on Windows From: nicolai.scheer@gmail.com (Nicolai Scheer) --047d7bb03eccd2cf8d04d2cd5236 Content-Type: text/plain; charset=UTF-8 Hi again! On 8 January 2013 14:56, Nicolai Scheer wrote: > > Do you have any advice how I can move lill' pandora to an extension? Of > course I might copy the complete simple_file_wrapper, but I'd rather not do > it that way... I did not find any "add standard stream context > option"-stuff in the API... > > I did finish to write a small extension this evening, which does what I want :) I just saved a copy of the php_plain_files_wrapper struct, deregistered the file wrapper during my MINIT, injected my own functions into the struct and registered it again. My own functions just wrap the original ones (using the saved original function pointers), adjust STREAM_ASSUME_REALPATH and add the prefix if necessary. Adjustments only kick in for paths exceeding MAX_PATH, so if all paths are within the usually allowed bounds, everything is back to original. Quick and dirty, but it works very well and is a feasible way for our project... until there's a better way :) Greetings Nico --047d7bb03eccd2cf8d04d2cd5236--