Access denied when trying to upload document to server

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Access denied when trying to upload document to server

Postby boilerpowered » 01. July 2008 22:21

I am currently trying to write a php script that will upload a document from the clients computer to my server. I am getting the following error:
--------------------
Warning: move_uploaded_file(/xampp/htdocs/creative/document_library/test_upload) [function.move-uploaded-file]: failed to open stream: Permission denied in C:\xampp\htdocs\creative\scripts\php\logic\resizejpg.php on line 29



Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\xampp\tmp\php403B.tmp' to '/xampp/htdocs/creative/document_library/test_upload' in C:\xampp\htdocs\creative\scripts\php\logic\resizejpg.php on line 29
--------------------

Here is the code I am using:
--------------------
ini_set('memory_limit',33554432*9);
ini_set('post_max_size',33554432*9);
ini_set('upload_max_filesize',33554432*9);
ini_set('max_execution_time',240);
ini_set('max_input_time',240);
$target_path = "/xampp/htdocs/creative/document_library/test_upload";
$target_path = $target_path . basename($_files['userfile']['name']);
$_FILES['uploadfile']['tmp_name'];
echo '<pre>';
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path);
echo 'Here is some more debugging info:';
print_r($_FILES);
print "</pre>";

--------------------------------
Has anyone dealt with this error? If so please help.
thanks
-----------
boiler.powered
boilerpowered
 
Posts: 1
Joined: 24. June 2008 05:36

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 156 guests