PHP 4.0 Bug #7860 Updated: pb with copy($source,$dest) when $dest point on network disk
| From: | phildriscoll@php.net | Date: | Fri, 17 Nov 2000 09:06:54 +0000 |
| Subject: | PHP 4.0 Bug #7860 Updated: pb with copy($source,$dest) when $dest point on network disk | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-38397@lists.php.net to get a copy of this message | ||
ID: 7860
Updated by: phildriscoll
Reported By: benoit.martin@alcatel.fr
Status: Feedback
Bug Type: Network related
Assigned To:
Comments:
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.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-17 03:45:57] benoit.martin@alcatel.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>
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7860