I think i've solved the madness.  In the php docs, it states:
<form enctype="multipart/form-data" action="_URL_" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">

With the MAX_FILE_SIZE _before_ the filename to upload.  Maybe I've missed
a post somwhere that already suggested this, but i tried rearranging the
tag order, assuming that since this is just a suggestion to the browser,
that perhaps moving or removing it might help.  WOuldn't ya know it,
butwhen i have the order like so:
<input name="userfile" type="file">
<input type="hidden" name="MAX_FILE_SIZE" value="1000">

The upload works just fine.  I did read one post on php.net pertaing to
this subject that stated:
"I am using PHP 4.1.1 on Apache / Linux. The upload procedure _requires_
that you have a line that sets the maximum file size in your form:

<input type="hidden" name="MAX_FILE_SIZE"

So perhaps it may fail if I move these pages to a different server/php


On Thu, 4 Apr 2002, Martin Towell wrote:

> >
> https://skunkWerkz.hosting-advantage.com/superSecretTesting/updateAdmin/MP3_
> Add.php
> not very secret, now that you've told everyone :)
> anyway - do you have any .htaccess directives in one directory, you don't
> have in the other?
> -----Original Message-----
> From: Carl Schmidt [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 04, 2002 3:39 PM
> To: Miguel Cruz
> Subject: Re: [PHP] Cannot upload JPEG only
> And here's the really wacky part i just found out. I have a page in prod
> that uploads MP3s.
> Part off what it does is upload the file, examine its' type , and then
> discard the file if it's not the type expected. Assuming the web host was
> set to not allow uploads of jpg and gif, the MP3 page wouldve errored out
> , saying it couldn't upload the file;  but the weird thing is that it
> _can_ upload jpgs and gifs, but needless to say discards them because
> they are the wrong type.
> I tried the same MP3 page in developmen, but it exhibits the same behavior
> as the image upload page in that it won't even upload a jpeg or gif.  This
> leads me to bleieve I've got some sort of configuration issue here.
> Both eprod and dev are on the same box.  Here's the paths to the 2 pages:
> Prod:
> https://skunkWerkz.hosting-advantage.com/updateAdmin/MP3_Add.php
> Dev:
> https://skunkWerkz.hosting-advantage.com/superSecretTesting/updateAdmin/MP3_
> Add.php
> Carl
> On Wed, 3 Apr 2002, Miguel Cruz wrote:
> > On Wed, 3 Apr 2002, Carl Schmidt wrote:
> > > Thank you for the code snippets.  Unfortunately the problem is that I
> > > can'tget far enough to process the file.  When the php script that
> > > supposed to process the file tests with is_uploaded_file, it fails.  In
> > > addtion, the $HTTP_POST_FILE['userfile']['tmp_name']=none.  So i can't
> > > process anything since, as far as php is concerned, it appears nothing
> is
> > > uploaded.
> >
> > What happens if you take a file that works, and rename it so the extension
> > is .GIF, and try uploading it? I mean, obviously it won't be a valid
> > image, but will it transfer and show up?
> >
> > miguel
> >
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to