By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,830 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,830 IT Pros & Developers. It's quick & easy.

move_uploaded_file(...): failed to open stream:

P: n/a
sa
Trying to upload a file using win xp/iis/php.

I've given full access to all accounts trying to get this to work? Yet
I'm still getting read errors. Simplified the script below to the
bare minimum.
simpleupload.php
<form enctype="multipart/form-data" action="upload.php" method="post">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="200000"/>
<input type="file" name="file1"/>
<input type="submit" value="UploadFile"/>
</form>

upload.php
<?php
move_uploaded_file($_FILES['file1']['tmp_name'],'c:\php\uploadperm');
?>

Error
Warning: move_uploaded_file(c:\php\uploadperm): failed to open stream:
Permission denied in C:\Inetpub\wwwroot\php\upload.php on line 2

Warning: move_uploaded_file(): Unable to move
'C:\PHP\uploadtemp\php35.tmp' to 'c:\php\uploadperm' in
C:\Inetpub\wwwroot\php\upload.php on line 2
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 09 Jul 2004 16:27:16 -0700, sa wrote:
upload.php
<?php
move_uploaded_file($_FILES['file1']['tmp_name'],'c:\php\uploadperm');
?>

Error
Warning: move_uploaded_file(c:\php\uploadperm): failed to open stream:
Permission denied in C:\Inetpub\wwwroot\php\upload.php on line 2


You do not have write permissions to c:\php\uploadperm.

--
Christian Jørgensen | If ignorance is bliss
http://www.razor.dk | - then knock the smile off my face ;)

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.