LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-11-2003, 05:04 AM   #1
antken
Member
 
Registered: Nov 2000
Posts: 368

Rep: Reputation: Disabled
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>
 
Old 03-15-2003, 06:50 AM   #2
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
uploading multiple files with php dizzutch Programming 0 01-04-2005 04:29 PM
PHP and File Uploading Tomasfuego Linux - Software 6 08-12-2004 09:20 AM
uploading php on free server?? farhan Linux - General 1 04-24-2003 04:45 AM
uploading with apache and php chens_83 Linux - General 6 02-16-2003 05:09 AM
PHP and uploading files Syncrm Linux - General 5 07-02-2002 11:49 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration