LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   uploading to a windows iis5.0 php enabled server (https://www.linuxquestions.org/questions/programming-9/uploading-to-a-windows-iis5-0-php-enabled-server-49253/)

antken 03-11-2003 05:04 AM

uploading to a windows iis5.0 php enabled server
 
hello,

i am trying to create a script that will allow me to upload a file to this ms windows webserver

( sadly they will not change it ) :(

its running:
windows 2k
iis5.0
and the latest version of php

i can run it successfully on a windows box with apache but iis will not have it

this is the error message i get:

failed to create stream: Permission denied

i have given permissions to all the directorys i can think of ( upload temp destination directory destination drive destination path )

and still nothing.

any ideas? ( code snippet below ) ( its an example i found off the web )


thanks
ant

Code:


<?
$_REQUEST["submit"]=isset($_REQUEST["submit"])?$_REQUEST["submit"]:"";
if($_REQUEST['submit']!="")
{
$filename=$_FILES['filex']['name'];
$tempfile=$_FILES['filex']['tmp_name'];
$size=$_FILES['filex']['size'];
print $filename;
copy($tempfile,"c:\\") or die("cant copy");

print "file $filename copied with size $size";
}
?>

<form method=post enctype=multipart/form-data action=<?=$_SERVER['PHP_SELF']?>>
    <input type=file name=filex>
    <input type=hidden name=MAX_FILE_SIZE value=88888889>
    <input type=submit name=submit value=upload>
</form>


niknah 03-15-2003 06:50 AM

it looks like you're trying to upload to...
c:\\
unless you made your server insecure by letting your web server write to c:\\ you should change it to c:\\temp and change the permissions there to allow your web server's user to write to it.


All times are GMT -5. The time now is 08:11 AM.