file uploads problem
| From: | Jaski | Date: | Tue, 24 Sep 2002 04:39:31 +0000 |
| Subject: | file uploads problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117371@lists.php.net to get a copy of this message | ||
Hi,
(Linux RH 7.1, Apache/1.3.22, PHP 4.0.6).
I am trying to write a script to send emails. It needs to support attachments. The point where I am stuck is after the file to be attached gets uploaded to /tmp as /tmp/tempfilename thorough an HTTP POST form.
I am not able to open that file directly .. follwing error shows up.
Warning: fopen("/tmp/phpOaILXx","rb") - Operation not
permitted in
/var/www/vhosts/mydomain/httpsdocs/lib/email.inc.php
on line 254
I tried to copy this file using
move_uploaded_file($userfile, "/place/to/put/uploaded/file");
and here a strange thing happened. The file was successfully copied BUT it had permissions like -rw------ which I interpret as only accessible to root. I tried copy() function instead and it failed.
I think I have tried every thing I could think of .. so please HELP :)
jaski
NP. I am subscribed to the digest version so kindly cc any replies to me as well. Thanks.