From: ovidiu at softped dot com
Operating system: Windows
PHP version: 5.4.14
Package: Safe Mode/open_basedir
Bug Type: Bug
Bug description:copy() not working with stream wrappers when open_basedir is set
Description:
------------
When open_basedir is set to something other than "no value" the copy
function
fails when trying to read from php://input with the following message:
Warning: copy(): open_basedir restriction in effect. File(php://input) is
not
within the allowed path(s): (d:\server)
However, when trying file_get_contents('php://input') it successfully reads
the
data.
Test script:
---------------
<?php
copy('php://input','destination.txt');
?>
Expected result:
----------------
Expected a new file to be created "destination.txt" with the contents of
php://input
Actual result:
--------------
Warning: copy(): open_basedir restriction in effect. File(php://input) is
not
within the allowed path(s): (d:\server)
--
Edit bug report at https://bugs.php.net/bug.php?id=64634&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=64634&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=64634&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=64634&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64634&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64634&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64634&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64634&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64634&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64634&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64634&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=64634&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=64634&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64634&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64634&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64634&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64634&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64634&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64634&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64634&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64634&r=mysqlcfg