[nycphp-talk] uploads
Jeremy Hise
jhise at nextsource.com
Wed Feb 19 14:38:01 EST 2003
Please forgive me if I'm not adding anything to do the discussion, but on your page that handles the uploaded file are you doing something like:
copy($uploadedfile, "~/uploaded_files/$uploadedfile_name");
unlink($uploadedfile);
? If you are, is the copy command complaining at all?
Keep in mind that when you do an upload, it's placed in a temporary location until you copy it somewhere else and delete the original (unlink()).
Can you put up the source code that handles the uploaded file?
Thanks!
hise
On Wed, 19 Feb 2003 14:16:31 -0500
Hans Zaunere <zaunere at yahoo.com> wrote:
>
> --- Brian <brian at preston-campbell.com> wrote:
> > I left them as $_FILES but meant to say I tried $HTTP_POST_FILES to see if
> > that had any effect.
> >
> > The odd thing is that I am not getting any errors when I upload a file. In
> > the upload script I am checking that a file was uploaded, the type of file
> > uploaded, the size, etc and if a file in the destination directory already
> > has the same name as the file being uploaded. The only time I get any type
> > of error is when I am trying to upload a file with the same name as one in
> > the directory.
>
> That's a good sign... at least the file is getting there... somehow.
>
> > According to PHP, the file upload is taking place. The database info
> > reflects that as well, as nothing is written to it until the uploaded file
> > is verified. Odd.
>
> Smells like uploaded... tastes like uploaded... it must be uploaded! So
> basically, everything happens as expected, except the file isn't in the
> expected directory? Maybe the admin has changed upload directories or paths?
> What event exactly causes the upload to be realized as unsuccessful?
>
> > I have contacted the sysadmin and am awaiting a response. I am hoping to
> > resolve the issue myself but this may not be possible. Also, I have not
> > been able to reproduce the situation on my local machine (LAMP with PHP
> > 4.3.0, same as the host server).
>
> It must be a sysadmin problem. http://us2.php.net/ChangeLog-4.php might be
> handy to realize any differances between your previous version and 4.3.0, but
> none come to mind off the bat.
>
> H
>
>
> >
> > Brian
> >
> > On Wednesday 19 February 2003 11:44 am, Analysis & Solutions wrote:
> > > Hi Brian:
> > >
> > > On Tue, Feb 18, 2003 at 12:02:11PM -0500, Brian wrote:
> > > > Anyone know what would have changed in 4.3.0 that would hinder my
> > > > attempts to
> > > > upload files with scripts that worked in previous versions?
> > > >
> > > > I had already replaced $_FILES with $HTTP_POST_FILES
> > >
> > > That should be the other way around. $_FILES is the thing to use.
> > >
> > > Anyway, if you're using the Apache Module version, the required
> > > permissions on directories has changed. They need to be world readable
> > > and executable (chmod 705). Perhaps this is is your difficulty?
> > >
> > > Enjoy,
> > >
> > > --Dan
> >
> >
> >
> >
> >
> >
> >
>
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---
>
--
-+----------------------+
| jhise at nextsource.com |
| developer |
| nextSource, Inc. |
| x334 |
+----------------------+
More information about the talk
mailing list