OK. What I've started doing is use PHP's ftp functions to login and PUT the
file in the right place. This allows me to move files and put em where I
want, with teh right permissions.
Check the manual for more info.
Andrew
> Hi,
>
> But it's already there.
>
> And the file is uploaded (since I can see it under
> /tmp)
> --- Andrew McCombe <[EMAIL PROTECTED]> wrote:
> > Put enctype="multipart/form-data" in your <form>
> > tag;
> >
> >
> > ----- Original Message -----
> > From: "Robert Mena" <[EMAIL PROTECTED]>
> > To: "php mailing list" <[EMAIL PROTECTED]>
> > Sent: Friday, July 04, 2003 4:00 PM
> > Subject: [PHP] PHP 4.3.0/4.3.2 - Strange problem
> > with exec /
> > move_uploaded_file
> >
> >
> > > Hi,
> > >
> > > I am faciing a strange problem. I have some php
> > > script to receive images (via file upload).
> > >
> > > The script is failling to work because it can't
> > > move/copy the file.
> > >
> > > I've added a sleep(x) in order to make the
> > temporary
> > > file stick around.
> > >
> > > 20 -rw------- 1 apache apache 19402
> > Jul 4
> > > 10:49 /tmp/phpFj6Irk
> > >
> > > I've added apache to an upload group
> > >
> > > upload:x:1098:apache
> > >
> > > And changed the owner of the directory.
> > >
> > > ls -sla /home/httpd/html/foo.com/img/news/
> > > total 24
> > > 4 drwxrwxr-x 6 webmaste upload 4096
> > Jul 4
> > > 10:11 .
> > > 4 drwxrwxr-x 5 webmaste webmaste 4096
> > Jun 10
> > > 15:55 ..
> > > 4 drwxrwxr-x 2 webmaste upload 4096
> > Jun 4
> > > 09:41 1
> > > 4 drwxrwxr-x 2 webmaste upload 4096
> > Jul 4
> > > 10:48 10
> > > 4 drwxrwxr-x 2 webmaste upload 4096
> > Jul 4
> > > 09:54 2
> > >
> > > And the both commands below fail.
> > >
> > > move_uploaded_file($tmpfile,$destination)
> > > exec("/bin/cp $tmpfile $destination",$array)
> > >
> > > The var_dump in array shows
> > >
> > > array(0) { }
> > >
> > > The $destination var has (checked with echo)
> > >
> > > /home/httpd/html/foo.com/img/news/10/xxx.jpg
> > >
> > > Any ideias ?
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > SBC Yahoo! DSL - Now only $29.95 per month!
> > > http://sbc.yahoo.com
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit:
> > http://www.php.net/unsub.php
> > >
> > >
> >
> >
>
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php