windows permissions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
devmatch
Forum Newbie
Posts: 19
Joined: Thu Mar 27, 2003 3:58 am

windows permissions

Post by devmatch »

buen rollito,

is there anybody who knows to change the permissions on windows xp to upload files?

THX

find something else:
<?php

if ($img1_name == "") {
?>
<html>
<head>
<title>Upload a File</title>
</head>
<!--
Formular: in einem Filepanel kann der Name
des lokalen Files angegeben werden,
das auf den Server hochgeladen werden soll.
-->
<body>
<h1>Upload a File</h1>
<form enctype="multipart/form-data" method="post"
action="<?php echo $PHP_SELF?>">
<p><strong>File to Upload:</strong><br>
<input type="file" name="img1" size="30"></p>
<P><input type="submit" name="submit"
value="Upload File"></p>
</form>
<?php
}

else {
$curdir=getcwd();

exec("/usr/local/info-sys/cgi-bin/phptouch
$SCRIPT_FILENAME $curdir/tmp/$img1_name",$t,$status);
if ($status > 2) { die ("<br>$t[0]"); }
if ($status == 2) {
print("File already exists, will be overwritten");
}

move_uploaded_file("$img1", "./tmp/$img1_name");

exec("phpchown $SCRIPT_FILENAME
$curdir/tmp/$img1_name",$r,$status);
if ($status >1) {
print("<br>$r[0]");
}

?>
<html>
<head>
<title>File Upload!</title>
<body>
<P>You sent: <?php echo "$img1_name"; ?>, a
<?php echo "$img1_size"; ?>
byte file with a mime type of
<?php echo "$img1_type"; ?>.</p>
<?php
}
?>
</body>
</html>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

take a look at the value of
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir =
then check the file permissions for that directory in your windows explorer (right-click on drive, properties, security settings/permissions/?)
Do the same for your target directory.
The account php is running on (maybe your webserver) needs read/write permissions for both directories.
Which webserver do you use?
/usr/local/info-sys/cgi-bin/phptouch
this is not a win32-path.
devmatch
Forum Newbie
Posts: 19
Joined: Thu Mar 27, 2003 3:58 am

Post by devmatch »

volka wrote:take a look at the value of
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir =
then check the file permissions for that directory in your windows explorer (right-click on drive, properties, security settings/permissions/?)
Do the same for your target directory.
The account php is running on (maybe your webserver) needs read/write permissions for both directories.
Which webserver do you use?
/usr/local/info-sys/cgi-bin/phptouch
this is not a win32-path.
yeah right with path!!! i'm using apache! do you know another solution? how could i change the permissions? there's only the dialog for changing intranet access !
Post Reply