Dear people,

here is my script


$action = $HTTP_POST_VARS["submit"];
$max_size = "50000000"; // Max size in BYTES (1MB)
$updir = "/var/www/html/";

echo "
$updir<br>$action<br>
<b>Uploader</b><br>
<form action='upl.php' method='post'  enctype='multipart/form-data'>
File (max size: $max_size bytes/".($max_size/1024)." kb):<br>
<!-- This is NOT a secure method of checking filesize, but it tells the user
if he tried to upload a file too big before
 he waits for the huge file to upload, make sure to check the filesize after
the form is sent as well -->
<!-- <input type='hidden' name='MAX_FILE_SIZE' value='$max_size'> (removed
because it wasn't working properly) -->
<input type='file' name='filename'><br>
<input type='hidden' name='action' value='upload'>
<input name='submit' type='submit' value='upload'>
</form>";


if ($action == 'upload')
{
        print "This is Insane";
        
        if ($_FILES["filename"]["size"] > $max_size) 
        {
        die ("<b>File too big!  Try again...</b>");
        }
        else
        {
        copy($_FILES["filename"]["tmp_name"],$updir.$_FILES["filename"]["name"]);//or
die("<b>Unknown error!</b>");
        //copy($_FILES["filename"]["tmp_name"],"./".$_FILES["filename"]["name"]) or
die("<b>Unknown error!</b>");
        echo "<b>File Uploaded.</b>"; // for debug -->  $filename -->
".$destination."/".$filename_name."</h2>";
        }
        
}

and upon execution i am getting this as error..
Warning: Unable to create '/var/www/html/install.log.syslog': Permission
denied in /var/www/html/upl.php on line 49

Line 49 is one starting with copy command.. 
i do not understand what this permission denied means when i have given full
permission to everyfile..
please oblige

Regards
Vishesh kaul
your only special contact on earth

Reply via email to