Re: STDERR not opened with php 5.0.5
| From: | Edin Kadribasic | Date: | Tue, 13 Sep 2005 09:13:35 +0000 |
| Subject: | Re: STDERR not opened with php 5.0.5 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-222258@lists.php.net to get a copy of this message | ||
Hi,
Perhaps your /usr/local/bin/php505 is a cgi instead of cli?
Edin
Florent Monnier wrote:
> Hi,
>
> on http://www.php.net/manual/en/features.commandline.php is
> writen:
> STDERR - An already opened stream to stderr. This saves opening it with:
> <?php
> $stderr = fopen('php://stderr', 'w');
> ?>
>
>
> But this does not work:
> #! /usr/local/bin/php505 -q
> <?php
> fwrite(STDERR, "error!\n");
> ?>
>
>
> This does work:
> #! /usr/local/bin/php505 -q
> <?php
> define('STDERR', fopen('php://stderr', 'w'));
> fwrite(STDERR, "error!\n");
> ?>
>
>
> Is the manual wrong or does php 5.0.5 have change this property ?
>
> Thanks
>