I've been having the same problem, sort of. I.e. the blanking out of
POST data when uploading a file, though it also happens in some
instances when using phpMyAdmin when sending an SQL query through its
interface.

I run the whole thing under WindowsXP with PHP 4.2.3, MySQL 3.23.52-nt
(though that has no bearing in the code to upload the file), and PHP
running as a module of Apache 1.3.27 and 1.3.26 before that. phpMyAdmin
is 2.3.1. I have checked and rechecked everything, and can't seem to
find the problem. I do believe that is a bug in the PHP engine, and
possibly the one mentioned at the top of the phpMyAdmin home page at
www.phpmyadmin.net. But not sure how that affects the file uploads.

It happens most of the time, but not always. I do ocasionally get to
upload the file (an image). Same file can succeed or fail. This is in
the windows XP, that I use for development. On the real servers, running
on Solaris and Red Hat Linux but with the same version of PHP and Apache
the same scripts work perfectly!

I posted before and someone suggested to check for the upload dir. I did
and it worked the first time, so I went to claim victory, only to
realize that it was again one off.

I do use register_globals = off (though I have tested with
register_globals = on and the result is the same, even in the error
log). I have checked for sizes of different things where they
correspond. I have also disabled mod_gzip in case it was an issue. I
also set implicit_flush = On to see if that would help, but it didn't.
Set the logs of Apache to debug and yet can't see anything wrong in
there. In this environment I have everything set to report all errors
and notices. The only thing that I see in the error logs is a couple
undefined variables when the POST information dissapears. In the
access.log there is hardly any difference between successful and
unsuccessful uploads.

I have read over 2700 posts (all that has been collected since I
subscribed to the list with my original post) in the hopes that
something would give me a clue as to what is happening, and this thread
is the closest.

I could only think of it being some environment variable limiting some
kind of buffer size or similar, but given that sometimes it works,
sometimes it doesn't with files in different size ranges and coming from
different folders in the system, I had to ditch that idea, for the time
being.

I could also go back to php 4.2.2, but I'm lazy ;) but if that could
help debug? Any ideas when the next version of PHP is coming out? Or can
anyone confirm that there is a bug of PHP on Windows which would
manifest this way?

Any help or further hints deeply appreciated!  :)

Cheers,
 
Jose 

PS. I have attached the httpd.conf and php.ini file. As for the PHP code
I can include it if requested, but it reproducible with a simple upload
form in my system, nothing special.


> -----Original Message-----
> From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> Sent: 08 October 2002 19:06
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] For my next bug... Upload filename gets blanked out
> 
> Is register_globals off? If it is, you should be using the $_FILES
array.
> 
> ---John Holmes...
> 
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 08, 2002 1:35 PM
> Subject: [PHP] For my next bug... Upload filename gets blanked out
> 
> 
> > In the form below, when I specify a file to upload (in $filename),
it
> gets
> > blanked out by the time I hit the Upload button and the page
refreshes.
> My
> > test file is a text file that certainly does *not* exceed the
> max_file_size
> > (it goes to about 27 k).
> >
> > <FORM ENCTYPE = "multipart/form-data" ACTION =
> "index.php?page=Uploadfile"
> > METHOD = "POST">
> >    <TABLE BGCOLOR = "#000000" BORDER = "0" CELLPADDING = "0"
CELLSPACING
> =
> > "0">
> >       <TR>
> >          <TD ALIGN = "CENTER">
> >             <DIV CLASS = "title">Upload</DIV>
> >             <SPAN CLASS = "header">Upload (filename):</SPAN> <INPUT
TYPE
> =
> > "FILE" NAME = "filename">
> >             <INPUT TYPE = "HIDDEN" NAME = "MAX_FILE_SIZE" VALUE =
> > "102400"><BR><BR>
> >             <INPUT TYPE = "SUBMIT" VALUE = "Upload">
> >          </TD>
> >       </TR>
> >    </TABLE>
> > </FORM>
> >
> >
> 
> 
>
------------------------------------------------------------------------
--
> --
> ----
> 
> 
> > --
> > 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

Attachment: httpd.zip
Description: Zip compressed data

Attachment: php.zip
Description: Zip compressed data

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

Reply via email to