Upload file Error
computer_jin - January 10, 2009 - 06:44
Hi every one ,
I want to upload a file and having problem in uploading file i used this
$dir = "sites/default/files/images";
$temp = "temp";
if ($file = file_save_upload('file_name', $validators, $temp)) {
if(file_move($file->filepath,$dir)) {
drupal_set_message('Saved');
}
}else{
drupal_set_message('error uploading');
}
but when i upload file on local pc it is working fine but when i upload this on server error uploading message comes there. I also set File system path: to as sites/default/files And Temporary directory: set Temp what will be this error please any one tell me
Thanks

Re: Upload Files Error
Hi every one,
Same problem for me also ,please any one tell me
Thanks,
Arulkumar
have u solved this problem
have u solved this problem ..........?
Could be permissions
It could be the permissions on the 2 directories (the files dir and the temp dir) - you need to make sure that the apache user (the user that apache is running as) has the ability to write to the files and the temp dir.
Mike,
Computerminds offer Drupal development, consulting and training
Yes, I have checked that its
Yes, I have checked that its already have ability to write the files on these folder...???
still i m facing problem to
still i m facing problem to upload files on server but files are uploading on my local pc.and i have checked permissions of directory but can any one specify my what will be this problem and how can i solve this problem .................
Azhar
4 Ace Technologies(www.4acetech.com)
karachi,Pakistan