From:
Operating system: Debian Linux 6.0.4
PHP version: 5.3.13
Package: Filesystem function related
Bug Type: Bug
Bug description:The "copy" function can't copy files from /proc
Description:
------------
The "copy" function can't copy files from /proc.
This is the "configure" line I used to compile PHP. (Don't be misled
by the value for "prefix"; I'm using PHP 5.3.13, not PHP 5.3.12.)
./configure --prefix=/usr/local/php/5.3.12 --disable-cgi --with-
pgsql=shared,/usr --with-xmlrpc=shared --with-tidy=shared,/usr --with-
mssql=shared,/usr --with-sqlite=shared,/usr --with-snmp=shared,/usr
--with-
xsl=shared,/usr --with-recode=shared,/usr --with-unixODBC=shared,/usr
--with-
pspell=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --with-
mysql=shared,/usr --with-mcrypt=shared,/usr --with-ldap-sasl=/usr --with-
ldap=shared,/usr --with-t1lib=shared,/usr --with-ttf=shared,/usr --enable-
intl=shared --with-pdo-firebird=shared,/usr --with-interbase=shared,/usr
--with-
imap-ssl --with-freetype-dir=shared,/usr --with-png-dir=shared,/usr
--with-xpm-
dir=shared,/usr/X11R6 --with-jpeg-dir=shared,/usr --with-gmp=shared,/usr
--
enable-gd-native-ttf --with-gd=shared,/usr --with-zlib-dir=/usr --with-
enchant=shared,/usr --with-curl=shared,/usr --without-mm --with-mhash=yes
--
enable-zip --enable-soap --with-openssl=/usr --with-kerberos=/usr
--with-zlib --
with-libxml-dir=/usr --enable-wddx --enable-sockets --enable-shmop
--with-pcre-
regex=/usr --with-onig=/usr --enable-mbstring --with-gettext --enable-ftp
--
enable-exif --with-iconv --without-gdbm --with-db4 --enable-ctype
--with-bz2 --
enable-bcmath --enable-sysvmsg --enable-sysvshm --enable-sysvsem --enable-
calendar --with-pic --disable-static --disable-rpath --with-regex=php
--disable-
debug --enable-pcntl --with-readline
Test script:
---------------
<?php
copy("/proc/self/stat", "php://stdout");
Expected result:
----------------
I expect the script to print the contents of /proc/self/stat.
Actual result:
--------------
The script prints nothing.
--
Edit bug report at https://bugs.php.net/bug.php?id=62072&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62072&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62072&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=62072&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62072&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=62072&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62072&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=62072&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=62072&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=62072&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=62072&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=62072&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=62072&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=62072&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62072&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=62072&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62072&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=62072&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=62072&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=62072&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=62072&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=62072&r=mysqlcfg