Re: [PHP] For my next bug... Upload filename gets blanked out

2002-10-08 Thread 1LT John W. Holmes

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 = #00 BORDER = 0 CELLPADDING = 0 CELLSPACING =
 0
   TR
  TD ALIGN = CENTER
 DIV CLASS = titleUpload/DIV
 SPAN CLASS = headerUpload (filename):/SPAN INPUT TYPE =
 FILE NAME = filename
 INPUT TYPE = HIDDEN NAME = MAX_FILE_SIZE VALUE =
 102400BRBR
 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




RE: [PHP] For my next bug... Upload filename gets blanked out

2002-10-08 Thread Liam . Gibbs

Is register_globals off? If it is, you should be using the $_FILES
array.

Hmm. Not sure about register_globals, but I'm not using $_FILES. I assume
its use is $_FILES[name_of_file || size_of_file]? I'll check it out.

Is there a disadvantage to using it? Ie. If register_globals is on, will it
still work? If there's no disadvantage, I might just go with it anyway
Avoids the hassle the next time I reinstall or switch servers.

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




RE: [PHP] For my next bug... Upload filename gets blanked out

2002-10-08 Thread Liam . Gibbs

Is register_globals off? If it is, you should be using the $_FILES
array.

I don't think that's it. Tell me if I'm using it improperly, but I tried to
print out the filename:

print([.$_FILES['uploadfile']['name'].]);

Is that it?

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




Re: [PHP] For my next bug... Upload filename gets blanked out

2002-10-08 Thread Kevin Stone

If there is any doubt print the array to find the indexes you need to recall
the filename..

echo pre;
print_r($_FILES);
echo /pre;

You'll figure it out quickly enough.  ::)

-Kevin

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 08, 2002 12:28 PM
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.

 I don't think that's it. Tell me if I'm using it improperly, but I tried
to
 print out the filename:

 print([.$_FILES['uploadfile']['name'].]);

 Is that it?

 --
 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




RE: [PHP] For my next bug... Upload filename gets blanked out

2002-10-08 Thread Jose

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 = #00 BORDER = 0 CELLPADDING = 0
CELLSPACING
 =
  0
TR
   TD ALIGN = CENTER
  DIV CLASS = titleUpload/DIV
  SPAN CLASS = headerUpload (filename):/SPAN INPUT
TYPE
 =
  FILE NAME = filename
  INPUT TYPE = HIDDEN NAME = MAX_FILE_SIZE VALUE =
  102400BRBR
  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



httpd.zip
Description: Zip compressed data


php.zip
Description: Zip compressed data

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


Re: [PHP] For my next bug... Upload filename gets blanked out

2002-10-08 Thread 1LT John W. Holmes

Just do a print_r($_FILES) and see what all of the contents are.

---John Holmes...

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 08, 2002 2:28 PM
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.

 I don't think that's it. Tell me if I'm using it improperly, but I tried
to
 print out the filename:

 print([.$_FILES['uploadfile']['name'].]);

 Is that it?

 --
 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




Re: [PHP] For my next bug... Upload filename gets blanked out

2002-10-08 Thread Justin French

Or look at the manual for a perfect working example of file uploading.

Why people keep trying to reinvent the wheel is beyond me...


Justin French


on 09/10/02 6:35 AM, 1LT John W. Holmes ([EMAIL PROTECTED]) wrote:

 Just do a print_r($_FILES) and see what all of the contents are.
 
 ---John Holmes...
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 08, 2002 2:28 PM
 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.
 
 I don't think that's it. Tell me if I'm using it improperly, but I tried
 to
 print out the filename:
 
 print([.$_FILES['uploadfile']['name'].]);
 
 Is that it?
 
 --
 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