A site i've built is being hosted on a windows server, i'm having the classic problem :
Warning: move_uploaded_file(c:/Webzone/RTWEB_Websites/blowpop.co.uk/www/uploads/john.jpg): failed to open stream: Permission denied in c:\Webzone\RTWEB_Websites\blowpop.co.uk\www\newsite\FFadmin.php on line 143
Warning: move_uploaded_file(): Unable to move 'C:\WINNT\TEMP\php925.tmp' to 'c:/Webzone/RTWEB_Websites/blowpop.co.uk/www/uploads/john.jpg' in c:\Webzone\RTWEB_Websites\blowpop.co.uk\www\newsite\FFadmin.php on line 143
john.jpg| could not be uploaded!
i presume that this is a permissions issue but i've spoken to the hosting company and they assure me they have granted me full permissions in the relavant folders. Saying that i mentioned CHMOD to him and he was confused saying "we dont deal with free things", what a fool.
Can someone with knowledge of IIS let me know exactly what permissions i need to be set to make this work, i'm guessing all but full control is needed. The question is whether i need any permissions on anything else like the temp folder to enable the file to be move_uploaded_file ?
I've also heard that for windows servers it is necessary to also include the c: on the beginning of the path..?
finally, could someone please check this just to make sure there is no problem on the script side of things as the hosting company is far from friendly(note to self: dont let client choose hosting)
if($mode == 'processFiles')
{
$uploadNeed = $_POST['uploadNeed'];
for( $x = 0; $x < $uploadNeed; $x++ )
{
$file_name = str_replace ( "'", "", stripslashes ( $_FILES['uploadFile' . $x]['name'] ) );
$uploaddir = '/Webzone/RTWEB_Websites/blowpop.co.uk/www/uploads/';
if ( move_uploaded_file ( $_FILES['uploadFile' . $x]['tmp_name'], $uploaddir . $file_name ) )
{
echo $file_name . '| uploaded sucessfully!<br>';
}
else
{
echo $file_name . '| could not be uploaded!<br>';
}
}
}
Thanks a lot.