No prob
<form enctype="multipart/form-data" name="New" action="ProcessNewNews.php" method="post"> <table border=0 width=100% bgcolor=#828967> <tr> <td width=100%><font face=arial size=2><b>Titill fréttar :</b></font></td> </tr><tr> <td width=100%> <input type=text name=HeadText size=63></td> </tr><tr> <td width=100%><font face=arial size=2><b>Frétt :</b></font></td> </tr><tr> <td width=100%> <textarea name=MainText rows=6 cols=47></textarea></td></tr> <tr><td width=100%><font face=arial size=2><b>Mynd</b></font> <input type="file" name="NewsPicture" size="43"></td> </tr><tr> <td width=100% align=right> <input type=Hidden value=New name=ToDo> <input type=hidden name=MAX_FILE_SIZE value=102400> <input type=Submit value=Skrá-frétt></td></tr></table> </form> ... //process $uploaddir = "/frettamyndir/"; echo(is_uploaded_file($_FILES['NewsPicture']['name'])); if (!empty($_REQUEST['ToDo'])) { if ($_REQUEST['ToDo'] == 'New') { if (move_uploaded_file($_FILES['NewsPicture']['tmp_name'], $uploaddir . $_FILES['NewsPicture']['name'])) { print "File is valid, and was successfully uploaded. Here's some more debugging info:\n"; print_r($_FILES); } else { print "Possible file upload attack! Here's some debugging info:\n"; print_r($_FILES); } } } And this is what it prints out C:\\php\\uploadtemp\ Warning: move_uploaded_file(/frettamyndir/cook.jpg) [function.move-uploaded-file]: failed to create stream: No such file or directory in C:\riddarinn\ProcessNewNews.php on line 21 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\\php\\uploadtemp\php8E.tmp' to '/frettamyndir/cook.jpg' in C:\riddarinn\ProcessNewNews.php on line 21 Possible file upload attack! Here's some debugging info: Array ( [NewsPicture] => Array ( [name] => cook.jpg [type] => image/pjpeg [tmp_name] => C:\\php\\uploadtemp\php8E.tmp [error] => 0 [size] => 40733 ) ) "Matt Babineau" <[EMAIL PROTECTED]> wrote in message 001301c2d7d8$7d0061c0$6610a8c0@webdevx">news:001301c2d7d8$7d0061c0$6610a8c0@webdevx... Can you post the code? --> -----Original Message----- --> From: Palli [mailto:[EMAIL PROTECTED]] --> Sent: Tuesday, February 18, 2003 11:14 PM --> To: [EMAIL PROTECTED] --> Subject: Re: [PHP-WIN] Problem with file upload!! --> --> --> Hello --> --> This is what I've done sofar... --> --> 1. the I_usr account on your server must have rights to the --> temp folder that php stores its temporary files, and also --> to the destination folder that you wish to copy a 'good' file. --> --> 2. the syntax for the path of the move command requires --> both a folder and the actual name of the posted file that --> is to exist on the server. eg, 'g:\\tmp\\'.$userfile_name --> unless, of course, you mean to save all of your files in --> the root of the drive! --> --> 3. you will need to make your path with two slashes like --> this -- g:\\tmp\\filename -- because a single slash from --> php escapes the next character, and that will make NT fretful. --> --> ....but im still getting this error --> --> Warning: move_uploaded_file(//frettamyndir//logo_final.jpg) --> [function.move-uploaded-file]: failed to create stream: No --> such file or directory in C:\riddarinn\Process.php on line 20 --> --> Could anyone tell my what seems to be the problem! --> --> thx --> palli --> --> --> "Matt Babineau" <[EMAIL PROTECTED]> wrote in message --> 001201c2d7b7$d3a30b20$6610a8c0@webdevx">news:001201c2d7b7$d3a30b20$6610a8c0@webdevx... --> You need to goto the folder permissions and add permission --> for the user "IUSR_<computername>" and give that user write --> permissions specifically to the folders that are envolved. --> I had the exact same error message you got and I did this --> and it worked. So whatever user your webserver is running --> on needs to have permission. You may want to even try --> giving full permissions and then tighten the security nuse --> once you get the upload working. --> --> -Matt --> --> --> -----Original Message----- --> --> From: Palli [mailto:[EMAIL PROTECTED]] --> --> Sent: Tuesday, February 18, 2003 8:34 PM --> --> To: [EMAIL PROTECTED] --> --> Subject: Re: [PHP-WIN] Problem with file upload!! --> --> --> --> --> --> Hi .... again!!! and thanx matt! --> --> --> --> This didnt solve my problem.... --> --> --> --> Im running on XP and im using IIS 5.1. I've change the --> server user --> --> to Administrator but I still cant upload a file. --> --> --> --> Can anybody help me --> --> --> --> "Matt Babineau" <[EMAIL PROTECTED]> wrote in message --> --> 000401c2d7ad$66febdc0$6610a8c0@webdevx">news:000401c2d7ad$66febdc0$6610a8c0@webdevx... --> --> I have also gotten the same exact error, it has to do with the --> --> permissions on the server and the IUSR_x having WRITE --> permissions to --> --> the folder you want to move the file to and to the PHP --> TEMP folder --> --> (I think). --> --> --> --> --> -----Original Message----- --> --> --> From: Palli [mailto:[EMAIL PROTECTED]] --> --> --> Sent: Tuesday, February 18, 2003 7:23 PM --> --> --> To: [EMAIL PROTECTED] --> --> --> Subject: Re: [PHP-WIN] Problem with file upload!! --> --> --> --> --> --> --> --> --> Hello again! --> --> --> --> --> --> now I get another error; --> --> --> --> --> --> Warning: move_uploaded_file(/frettamyndir/fastfood.jpg) --> --> --> [function.move-uploaded-file]: failed to create stream: --> --> No such file --> --> --> or directory in C:\riddarinn\Process.php on line 16 --> --> --> --> --> --> Warning: move_uploaded_file() --> --> --> [function.move-uploaded-file]: Unable to move --> --> --> 'C:\PHP\uploadtemp\php98.tmp' to --> --> '/frettamyndir/fastfood.jpg' in --> --> --> C:\riddarinn\Process.php on line 16 --> --> --> --> --> --> Can anyone tell me what this means? --> --> --> --> --> --> thx --> --> --> Palli --> --> --> --> --> --> "Matt Hillebrand" <[EMAIL PROTECTED]> wrote in message --> --> --> 002501c2d794$1541a330$0100a8c0@beast">news:002501c2d794$1541a330$0100a8c0@beast... --> --> --> You need to write: --> --> --> --> --> --> <form enctype="multipart/form-data" action="Process.php" --> --> --> method=post> --> --> --> --> --> --> Matt --> --> --> --> --> --> |-----Original Message----- --> --> --> |From: Palli [mailto:[EMAIL PROTECTED]] --> --> --> |Sent: Tuesday, February 18, 2003 3:21 PM --> --> --> |To: [EMAIL PROTECTED] --> --> --> |Subject: [PHP-WIN] Problem with file upload!! --> --> --> | --> --> --> | --> --> --> |Hello I'm wondering what is wrong whit my code. I´m --> --> --> trying to upload --> --> --> |an image but I keep getting this error message?? --> --> --> | --> --> --> |Notice: Undefined index: NewsPicture in --> --> --> C:\riddarinn\Process.php on --> --> --> |line 17 --> --> --> | --> --> --> |This is my code : --> --> --> | --> --> --> |<form name="New" action="Process.php" method="post"> ... --> --> --> |<input type=file name="NewsPicture" size=43> --> --> --> |<input type=hidden name=MAX_FILE_SIZE value=10240> --> --> --> |<input type=Submit value=Skrá-frétt> --> --> --> |... --> --> --> |</form> --> --> --> | --> --> --> |// my process site --> --> --> |... --> --> --> |if --> --> (move_uploaded_file($_FILES['NewsPicture']['tmp_name'], $udir . --> --> --> |$_FILES['NewsPicture']['name'])) --> --> --> |... --> --> --> | --> --> --> |THX --> --> --> |Palli --> --> --> | --> --> --> | --> --> --> | --> --> --> | --> --> --> | --> --> --> |-- --> --> --> |PHP Windows Mailing List (http://www.php.net/) --> --> --> |To unsubscribe, visit: http://www.php.net/unsub.php --> --> --> | --> --> --> | --> --> --> | --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> -- --> --> --> PHP Windows Mailing List (http://www.php.net/) --> --> --> To unsubscribe, visit: http://www.php.net/unsub.php --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> -- --> --> PHP Windows Mailing List (http://www.php.net/) --> --> To unsubscribe, visit: http://www.php.net/unsub.php --> --> --> --> --> --> --> --> --> -- --> PHP Windows Mailing List (http://www.php.net/) --> To unsubscribe, visit: http://www.php.net/unsub.php --> --> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php