Edit report at http://bugs.php.net/bug.php?id=42965&edit=1

 ID:                 42965
 Updated by:         ka...@php.net
 Reported by:        mmatson at apple dot com
 Summary:            copy() should support context parameters for URLs
-Status:             Assigned
+Status:             Closed
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   OS X 10.4.10
 PHP Version:        5.2.4
 Assigned To:        kalle
 Block user comment: N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed for 5.3.4, see svn logs for more info why it wasn't working in
5.3.0-5.3.3


Previous Comments:
------------------------------------------------------------------------
[2010-08-16 23:56:37] ka...@php.net

Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=302376
Log: Fixed the context parameter on copy() to actually have an effect

# After looking at the logs, Jani did a bad merge into 5.3, so that
# the context parameter sent to copy() actually isn't used at all. This
# relatively simple patch fixes that for trunk.
#
# See FR #42965

# internals:
# This changes the php_copy_*() decls to contain an additional parameter
for stream contexts

------------------------------------------------------------------------
[2007-10-15 02:21:55] mmatson at apple dot com

Description:
------------
The copy function should accept context parameters since it can accept 

URL's of the fopen wrapper variety. Specific situation where this is 

needed is when using ftp:// url's you should be able to specify 

overwrite context for the destination URL.

Reproduce code:
---------------
N/A: feature request for filesystem function

Expected result:
----------------
copy should be able to over write a destination file when using ftp:// 

url's

Actual result:
--------------
Throws error:

PHP Warning:  copy(ftp://....@host.com/testFTP/test): failed to open 

stream: Remote file already exists and overwrite context option not 

specified.




------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=42965&edit=1

Reply via email to