Hi Jamie and list,
Jamie, how are you, long time no speak! I've been to NY twice now in
the last 6 months, although each time for less than 20 hours. I might
be back sometime in May, for about a week. Maybe we could meet up...
On 16 Mar 2004, at 00:12, Jamie McClelland wrote:
> Hi all - I encountered problems with media upload using version 1.5. I
> think removing the enctype=multipart/form-data is causing the problems.
When I originally altered that code, back in June and July last year, I
was developing on a single machine running WinNT. FTP upload worked
without the enctype=multipart/form-data bit! And I thought that the
removal of the enctype=multipart/form-data bit would enable the code to
work on a system with safe mode enabled.
> As far as I can tell, this is what is supposed to happen:
> 1. When enctype=multipart/form-data, the browser and web server work
> together to upload the file to the server's tmp directory. At this
> information about the uploaded file (it's temp name, real name, size,
> etc.) is stored in the $_FILES array. The file is owned by the user
> the server is running as.
> 2. Then - the ftp client (which is running on the server), ftp's the
> from the server's tmp directory to the media directory - in the process
> making it owned by the ftp user.
> If enctype is not set, then no file is uploaded. The name of the file
> stored in the $_POST array, but the ftp client complains about the file
> not existing.
On my new system, now Mac OS X, there is no error reported, and
connecting to the Mac server from the WinNT machine there is an error
> To get it to work - I re-added the enctype to the pt_media_new.inc file
> and made a few changes (including iterating through the $_FILES array)
> order to get the proper data.
Yes I can confirm that your patched files work here as as well, both
uploading from the Mac to the Mac, and uploading from WinNT to the Mac.
> This arrangement seems to work with register globals on or off.
Certainly works here with register globals off, which is the difficult
> p.s attached are the affected files and diffs
All received. Not worked out yet quite what to do with a .diff file on
Mac OSX. Only just got CVS working in a way I'm confident with. I'll
commit your patched files to CVS when I get a moment, unless you get
there first Jamie.
Before I do a 1.06 release, has anyone else on the pagetool-devel list
found any bugs in the 1.05 release? It did all work fine on my WinNT
machine, but as this bug shows, just because it works on one system
doesn't mean it's going to work on another system!
There is one slight issue I've found. The value for $ptconf('version')
isn't available to the pt_upload.php file as it comes from
pagetool.inc. It's not a show stopper, and would be difficult to sort,
so I was just going to put a comment in pt_upload.php to mention the
fact that we knew about the problem and leave it at that.
d a v e