I am not able to upload file through web. All the time I am getting these messages when we try to upload through web
I just echoed to check whether it is coping to the tmp folder. Out put is temp file=/tmp/phpZMdTvx
Warning: copy(/var/www/html/abstract/Topics.doc): failed to open stream: Permission denied in /var/www/html/abstract.php on line 176
failed to to upload file Topics.doc...
My abstract folder permission is shown drwxrwxrwx 2 root apache 4096 Apr 2 21:03 abstract
The following is the part of php program
$document=$HTTP_POST_FILES['file']['name'];
if(strlen($ans)>0)
{
if($ans != "none")
{
$destination = "/var/www/html/abstract/";
// $HTTP_POST_FILES['file'];
echo "temp file=".$ans;
if (!copy($ans, $destination. $document ))
// if (move_uploaded_file($ans, $destination . $document))
{
echo "failed to to upload file $document...\n";
}
unlink($ans);
}
}
I am disparate to find a solution for this. regards sangunni
Rakesh 'arky' Ambati wrote:
--- "Dr.K.S.Sangunni" <[EMAIL PROTECTED]> wrote:
In Php.ini I have made file_upload=on and also gave
the file folder location to save so that it won't be using the
default. If I understood correctly, first it copies the file to the tmp
folder and then to the folder specified. Is this correct? Still I get the
error message that it is not able to write in "/temp/xxx". I am still at
it. Any help is appreciated.
I believe the option in php.ini file is
file_uploads = On
And as Rohan has already mentioned, you have mention
the temp storage area also with
upload_tmp_dir = /< your tmp folder here>
HTH
-arky PS: You can call me # 51281150 if you need any help.
__________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-india-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-india-help
