Re: Trouble With FTP_PUT Please Help!
| From: | Adnan | Date: | Wed, 28 May 2003 17:20:06 +0000 |
| Subject: | Re: Trouble With FTP_PUT Please Help! | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149294@lists.php.net to get a copy of this message | ||
Adam Voigt wrote:
> I think what you want is:
>
> move_uploaded_file($_FILES['imagefile']['tmp_name'],$ftpdir .
> $_FILES['imagefile']['name']);
>
> (Apologies if it wraps, that should be all one line.)
>
>
>
> On Wed, 2003-05-28 at 12:58, Adnan wrote:
>> Adam Voigt wrote:
>>
>> > Hmm, what's the exact error message you get?
>> >
>> >
>> > On Wed, 2003-05-28 at 12:43, Adnan wrote:
>> >> Adam Voigt wrote:
>> >>
>> >> > If your running under linux/unix, do:
>> >> >
>> >> > chown webuser:webuser /tmp/php
>> >> >
>> >> > Supplement /tmp/php with whatever upload path you have
>> >> > set in your php.ini, and webuser with whatever user your
>> >> > webserver runs as.
>> >>
>> >> just did that, and did a
>> >>
>> >> print_r($_FILES);
>> >> and this is what i got
>> >> Array ( [imagefile] => Array ( [name] => photo.jpg [type] =>
>> >> image/jpeg
>> >> [tmp_name] => /tmp/php/ phpBEzrql [error] => 0 [size] => 35532 ) )
>> >>
>> >> thanks for your help :)
>> >>
>> >> adnan
>>
>> i get this when i put:
>>
>> $destination_file=$ftp_dir.$_FILES['imagefile'];
>>
>> Warning: ftp_site() [function.ftp-site]: /Array: No such file or
>> directory in /srv/virtual/test_barakat/en/inc/photoposted.inc.php on line
>> 26
>>
>> but if i change it to
>>
>> $destination_file=$ftp_dir.'image.jpg';
>>
>> i get what i said earlier
>>
>> thanks
im getting
Warning: move_uploaded_file(/image.jpg) [function.move-uploaded-file]:
failed to create stream: Permission denied in
/srv/virtual/website/en/inc/photoposted.inc.php on line 26
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move
'/tmp/php/php2RUYd7' to '/image.jpg' in
/srv/virtual/website/en/inc/photoposted.inc.php on line 26
i suppose at least it narrows down the problem a little. is this down to
doing chown ?? coz i did it