Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15443 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24149 invoked by uid 1010); 15 Mar 2005 00:55:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23874 invoked by uid 1007); 15 Mar 2005 00:55:04 -0000 Message-ID: <20050315005504.23873.qmail@lists.php.net> To: internals@lists.php.net Date: Tue, 15 Mar 2005 01:55:00 +0100 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de, de-at, de-de, en-us, en MIME-Version: 1.0 References: <4236213F.4070209@davyandbeth.com> In-Reply-To: <4236213F.4070209@davyandbeth.com> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 217.227.197.196 Subject: Re: CLI issue: Changing STDERR From: webmaster@ragnarokonline.de (Christian Stadler) Davy Durham schrieb: > On Linux: I'm converting some bash scripts to php.. in the bash scripts > I sometimes do at the very top: > > " exec 2>/path/filename " > > Which changes where stderr goes because it closes and reopens file > descriptor 2 [snipp] > Is there a way of changing the actual process's file descriptor 2 to > something else. (or any fd for that matter) Just an idea out of the blue: Did you try your luck with the Sha-Bang? e. g. #!/usr/bin/php -q 2>/path/filename Regards, Christian Stadler