php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7860 pb with copy($source,$dest) when $dest point on network disk
Submitted: 2000-11-17 03:45 UTC Modified: 2001-06-21 23:41 UTC
From: benoit dot martin at alcatel dot fr Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.3pl1 OS: Windows NT
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: benoit dot martin at alcatel dot fr
New email:
PHP Version: OS:

 

 [2000-11-17 03:45 UTC] benoit dot martin at alcatel dot fr
Hi,

I have an Apache Server and PHP 4.0.3pl1 installed on WindowsNT.
I am trying to make the following script work
The pb is when the destination file is on c:\dir\$Fichier_dest it works
but when i use a virutal letter F:\ that point on a network computer,
the answer is unable to create file 'myfile' : permission denied !
and when a try the same thing in a MS-DOS window (copy c:\myfile.txt
f:\myfile.txt) it works !!!!!
does anyone can help me ????

the script :

<html>

<?
 if ($Fichier && $Fichier != "none") {

 echo "<U><B>Votre fichier :</B></U><BR>";
 echo "Fichier sur serveur : $Fichier<BR>";
 echo "Fichier envoy?      : $Fichier_name<BR>";
 echo "Taille              : $Fichier_size<BR>";
 echo "Type                : $Fichier_type<BR>";
 $Fichier_dest = "f:\\".$Fichier_name;


 if (!copy($Fichier, $Fichier_dest)) {
       print ("failed to copy $Fichier_dest <br>\n");
  echo "$php_errormsg";
      } else {
  print ("$Fichier_dest copi?...");
 }

}

?>
<BODY>
<FORM ENCTYPE="multipart/form-data" METHOD="POST">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000">
Envoyer le fichier : <INPUT NAME="Fichier" TYPE="file">
<INPUT TYPE="submit" VALUE="Envoyer le fichier">
</FORM>
</BODY>
</HTML>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-17 04:06 UTC] phildriscoll@php.net
When you copy file in the dos window, you do so with the permissions of whoever you logged on as. When PHP does it, it probably does it as IUSR_MACHINENAME - which may not have permission to access the network drive.

Can you check your permissions and report back.
 [2000-11-17 09:37 UTC] phildriscoll@php.net
I've exchanged a few emails and it does seem that NY access permissions are ok - 'Everyone' has 'full control' on the shared drive.

Any other ideas anyone?
 [2000-11-23 07:36 UTC] stas@php.net
reclassify - this has nothing to do with PHP networking.
 [2001-06-03 01:14 UTC] sniper@php.net
Does this happen with PHP 4.0.5? And fyi, UNC support is 
added in PHP 4.0.6..


 [2001-06-21 23:41 UTC] sniper@php.net
No feedback. Reopen if this doesn't work with PHP 4.0.6
(which is released today)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC