From:             andrey dot vihrov at gmail dot com
Operating system: Gentoo Linux amd64
PHP version:      5.2.10
PHP Bug Type:     Output Control
Bug description:  Errors are not reported for STDOUT/STDERR

Description:
------------
There is no way to tell that output to STDOUT/STDERR failed.

Configure Command =>  './configure'  '--prefix=/usr/lib64/php5'
'--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man'
'--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc'
'--cache-file=./config.cache' '--with-libdir=lib64'
'--with-pcre-regex=/usr' '--enable-cli' '--disable-cgi'
'--with-config-file-path=/etc/php/cli-php5'
'--with-config-file-scan-dir=/etc/php/cli-php5/ext-active' '--without-pear'
'--disable-bcmath' '--with-bz2' '--disable-calendar' '--disable-ctype'
'--without-curl' '--without-curlwrappers' '--disable-dbase' '--enable-exif'
'--without-fbsql' '--without-fdftk' '--disable-filter' '--disable-ftp'
'--with-gettext' '--without-gmp' '--disable-hash' '--disable-ipv6'
'--disable-json' '--without-kerberos' '--enable-mbstring' '--with-mcrypt'
'--without-mhash' '--without-msql' '--without-mssql' '--with-ncurses'
'--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl'
'--disable-pdo' '--without-pgsql' '--disable-posix' '--with-pspell'
'--without-recode' '--disable-simplexml' '--disable-shmop' '--without-snmp'
'--disable-soap' '--disable-sockets' '--without-sybase'
'--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem'
'--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx'
'--disable-xmlreader' '--disable-xmlwriter' '--without-xmlrpc'
'--without-xsl' '--disable-zip' '--with-zlib' '--disable-debug'
'--enable-dba' '--without-cdb' '--with-db4' '--disable-flatfile'
'--with-gdbm' '--disable-inifile' '--without-qdbm'
'--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir'
'--with-gd' '--without-mysqli' '--with-readline' '--without-libedit'
'--without-mm' '--with-sqlite=/usr' '--enable-sqlite-utf8'

> diff php.ini-dist /etc/php/cli-php5/php.ini 
474c474
< ;include_path = ".:/php/includes"
---
> include_path = ".:/usr/share/php5:/usr/share/php"
491c491
< extension_dir = "./"
---
> extension_dir =
/usr/lib64/php5/lib/php/extensions/no-debug-non-zts-20060613
560c560
< allow_url_fopen = On
---
> allow_url_fopen = Off
1283a1284,1288
> 
> ; MySQL extensions default connection charset settings
> ;mysql.connect_charset = utf8
> ;mysqli.connect_charset = utf8
> ;pdo_mysql.connect_charset = utf8

Reproduce code:
---------------
#! /usr/bin/php
<?
        $s = "Hello World\n";

        if (printf($s) != strlen($s))
                exit(1);

        if (fclose(STDOUT) != TRUE)
                exit(1);
?>

Expected result:
----------------
A /dev/full pseudo-device in Linux is "always full", and any writes to it
fail. When run as "./test.php > /dev/full", the script should exit
unsuccessfully (with exit status 1).

Actual result:
--------------
> ./test.php > /dev/full
> echo $?
0


-- 
Edit bug report at http://bugs.php.net/?id=48802&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48802&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48802&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48802&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48802&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48802&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48802&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48802&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48802&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48802&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48802&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48802&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48802&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48802&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48802&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48802&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48802&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48802&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48802&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48802&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48802&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48802&r=mysqlcfg

Reply via email to