Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

upload file problem 3

Status
Not open for further replies.

kurie

Programmer
Jun 4, 2008
170
ZA
hi all,
im trying to upload on a webserver but im getting the following error message

Warning: move_uploaded_file(upload/cellnumbers.txt) [function.move-uploaded-file]: failed to open stream:

Permission denied in /home/tmobiles/public_html/bulkpush.php on line 6

here is the piece of code im using:

$target = "upload/";
$target = $target . basename( $_FILES['file']['name']) ;
echo $target;
if(move_uploaded_file($_FILES['file']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
 
thanks
all the permissions are there, i have verified on filezilla, my upload app.

 
run this from the same directory and post the results back

Code:
<?php
$dir = './upload/';
$dir = realpath($dir);
if (!file_exists($dir)) echo "$dir does not exist<br/>";
if (!is_dir($dir)) echo "$dir is not a directory<br/>";
if (!is_writable($dir)) echo "$dir is not writable by the php process <br/>";
if (!headers_sent()) echo "no problems found <br/>";
?>
 
thanks very much
here is the result
/home/tmobiles/public_html/upload is not writable by the php process
 
thanks guys,
there were no full permissions for public users, only permissions for writer where set.
thansk very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top