From: james dot grey at bt dot com
Operating system: W2K
PHP version: 4.3.3
PHP Bug Type: Network related
Bug description: Cannot copy() files to mapped drive
Description:
------------
copy()Seem to fail only when the destination directory is a mapped drive
with...
also tried this...
//WORKS FINE
$cmd = "copy D:\\temp\\test.csv D:\\temp\\temp_2\\test2.csv";
system($cmd, $retval)
//FAILS!!
$cmd = "copy D:\\temp\\temp_2\\test.csv
J:\\10_Operational\\INLIFESUPPORT\\HELPDESK\\test.csv";
system($cmd, $retval);
yet checking the remote location in DOS... its all ok
C:\>copy D:\temp\temp_2\test.csv
J:\10_Operational\INLIFESUPPORT\HELPDESK\test.csv
1 file(s) copied.
Reproduce code:
---------------
$filename = "test.csv";
$dir_remote = "J:\\10_Operational\\INLIFESUPPORT\\HELPDESK\\";
$dir_local = "D:\\temp\\";
$dir_local2 = "D:\\temp\\temp_2\\";
//works fine
copy($dir_local . $filename , $dir_local2 . $filename);
//does not work..
copy($dir_local . $filename , $dir_remote . $filename);
Expected result:
----------------
file copied to local and remote location
Actual result:
--------------
Warning: copy(J:\10_Operational\INLIFESUPPORT\HELPDESK\test.csv): failed
to open stream: No such file or directory in ...
--
Edit bug report at http://bugs.php.net/?id=26214&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26214&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26214&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26214&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26214&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26214&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=26214&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26214&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26214&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26214&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26214&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26214&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26214&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26214&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26214&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26214&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26214&r=float