ID:               21450
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
-Bug Type:         Unknown/Other Function
+Bug Type:         Feature/Change Request
 Operating System: Windows 2000 Pro
 PHP Version:      4CVS-2003-01-05 (dev)
-Assigned To:      
+Assigned To:      sesser
 New Comment:


Content-disposition: form-data; filename="etc\root.hint"

This line of the rfc1867 fileupload lacks a name="whatever"
attribute. PHP cannot handle anonymous fileuploads for now... (I will
implement that) 


Previous Comments:
------------------------------------------------------------------------

[2003-01-05 22:29:03] [EMAIL PROTECTED]

Here is a capture of a complete request made by WPW:

POST /temp/fb.php HTTP/1.1
Accept: */*
Content-Type: Multipart/Form-Data,boundary=19359@23195#13275
User-Agent: Microsoft HTTP Post (RFC1867)
Host: 10.0.0.7
Connection: Keep-Alive
Cache-Control: no-cache
Content-Length: 3002

--19359@23195#13275
Content-disposition: form-data; filename="etc\root.hint"
Content-type: application/octet-stream

;       This file holds the information on root name servers needed to
;       initialize cache of Internet domain name servers
;       (e.g. reference this file in the "cache  .  <file>"
;       configuration file of BIND domain name servers).
;
;       This file is made available by InterNIC registration services
;       under anonymous FTP as
;           file                /domain/named.root
;           on server           FTP.RS.INTERNIC.NET
;       -OR- under Gopher at    RS.INTERNIC.NET
;           under menu          InterNIC Registration Services (NSI)
;              submenu          InterNIC Registration Archives
;           file                named.root
;
;       last update:    Aug 22, 1997
;       related version of root zone:   1997082200
;
;
; formerly NS.INTERNIC.NET
;
.                        3600000  IN  NS    A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET.      3600000      A     198.41.0.4
;
; formerly NS1.ISI.EDU
;
.                        3600000      NS    B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET.      3600000      A     128.9.0.107
;
; formerly C.PSI.NET
;
.                        3600000      NS    C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET.      3600000      A     192.33.4.12
;
; formerly TERP.UMD.EDU
;
.                        3600000      NS    D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET.      3600000      A     128.8.10.90
;
; formerly NS.NASA.GOV
;
.                        3600000      NS    E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET.      3600000      A     192.203.230.10
;
; formerly NS.ISC.ORG
;
.                        3600000      NS    F.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET.      3600000      A     192.5.5.241
;
; formerly NS.NIC.DDN.MIL
;
.                        3600000      NS    G.ROOT-SERVERS.NET.
G.ROOT-SERVERS.NET.      3600000      A     192.112.36.4
;
; formerly AOS.ARL.ARMY.MIL
;
.                        3600000      NS    H.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET.      3600000      A     128.63.2.53
;
; formerly NIC.NORDU.NET
;
.                        3600000      NS    I.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET.      3600000      A     192.36.148.17
;
; temporarily housed at NSI (InterNIC)
;
.                        3600000      NS    J.ROOT-SERVERS.NET.
J.ROOT-SERVERS.NET.      3600000      A     198.41.0.10
;
; housed in LINX, operated by RIPE NCC
;
.                        3600000      NS    K.ROOT-SERVERS.NET.
K.ROOT-SERVERS.NET.      3600000      A     193.0.14.129 
;
; temporarily housed at ISI (IANA)
;
.                        3600000      NS    L.ROOT-SERVERS.NET.
L.ROOT-SERVERS.NET.      3600000      A     198.32.64.12
;
; housed in Japan, operated by WIDE
;
.                        3600000      NS    M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET.      3600000      A     202.12.27.33
; End of File

--19359@23195#13275--

------------------------------------------------------------------------

[2003-01-05 21:47:40] [EMAIL PROTECTED]

When using microsoft web publishing wizard to post files to a php
script $_FILES is always empty. Logged in my php error log is:
[06-Jan-2003 16:46:49] PHP Warning:  File Upload Mime headers garbled
in Unknown on line 0
It is able to reteive some of the post values but not the files. Is
this really a Microsoft RFC compliance problem or a PHP problem?

Using the following script:
<?php
$fp = fopen('c:\fb.log', 'ab+');
fwrite($fp, "\nNew Hit\n**************************\n");

fwrite($fp, '$_SERVER:' . "\n");
fwrite($fp, var_export($_SERVER, true). "\n");
fwrite($fp, '$_REQUEST:' . "\n");
fwrite($fp, var_export($_REQUEST, true). "\n");
fwrite($fp, '$_FILES:' . "\n");
fwrite($fp, var_export($_FILES, true). "\n");
fwrite($fp, '$_GET:' . "\n");
fwrite($fp, var_export($_GET, true). "\n");
fwrite($fp, '$_POST:' . "\n");
fwrite($fp, var_export($_POST, true) . "\n");

$content = var_export(time(), true);

header('Allow: OPTIONS, TRACE, GET, HEAD, PUT, DELETE, POST');
header('Content-Type: text/html');
header('Content-Length: ' . strlen($content));

$headers = apache_request_headers();

fwrite($fp, "Request:\n");
foreach ($headers as $header => $value) {
    fwrite($fp, "$header: $value\n");
}

fclose($fp);
echo $content;


I set WPW to HTTP Post files to the URL of this script and the files
are never available. A common entry in fb.log looks like this:
New Hit
**************************
$_SERVER:
array (
  'COMSPEC' => 'C:\\\\WINNT\\\\system32\\\\cmd.exe',
  'CONTENT_LENGTH' => '189',
  'CONTENT_TYPE' => 'Multipart/Form-Data,boundary=23264@18686#20663',
  'DOCUMENT_ROOT' => 'i:/httpd/www.graftonhall.co.nz/htdocs',
  'HTTP_ACCEPT' => '*/*',
  'HTTP_CACHE_CONTROL' => 'no-cache',
  'HTTP_CONNECTION' => 'Keep-Alive',
  'HTTP_HOST' => 'www.graftonhall.co.nz',
  'HTTP_USER_AGENT' => 'Microsoft HTTP Post (RFC1867)',
  'PATH' => 'C:\\\\Program Files\\\\sapdb\\\\web\\\\pgm;C:\\\\Program
Files\\\\sapdb\\\\indep_prog\\\\pgm;C:\\\\Program
Files\\\\sapdb\\\\indep_prog\\\\bin;C:\\\\Program
Files\\\\sapdb\\\\indep_prog\\\\pgm;C:\\\\Program
Files\\\\NetworkSimplicity\\\\ssh;C:\\\\WINNT\\\\system32;C:\\\\WINNT;C:\\\\WINNT\\\\System32\\\\Wbem;C:\\\\Program
Files\\\\J2SDK\\\\bin',
  'REMOTE_ADDR' => '10.0.0.4',
  'REMOTE_PORT' => '1231',
  'SCRIPT_FILENAME' =>
'i:/httpd/www.graftonhall.co.nz/htdocs/temp/fb.php',
  'SERVER_ADDR' => '10.0.0.4',
  'SERVER_ADMIN' => '[EMAIL PROTECTED]',
  'SERVER_NAME' => 'www.graftonhall.co.nz',
  'SERVER_PORT' => '80',
  'SERVER_SIGNATURE' => '<ADDRESS>Apache/1.3.26 Server at
www.graftonhall.co.nz Port 80</ADDRESS>
',
  'SERVER_SOFTWARE' => 'Apache/1.3.26 (Win32) PHP/4.4.0-dev',
  'SystemRoot' => 'C:\\\\WINNT',
  'WINDIR' => 'C:\\\\WINNT',
  'GATEWAY_INTERFACE' => 'CGI/1.1',
  'SERVER_PROTOCOL' => 'HTTP/1.1',
  'REQUEST_METHOD' => 'POST',
  'QUERY_STRING' => '',
  'REQUEST_URI' => '/temp/fb.php',
  'SCRIPT_NAME' => '/temp/fb.php',
  'PATH_TRANSLATED' =>
'i:/httpd/www.graftonhall.co.nz/htdocs/temp/fb.php',
  'PHP_SELF' => '/temp/fb.php',
  'argv' => 
  array (
  ),
  'argc' => 0,
)
$_REQUEST:
array (
  'TargetURL' => 'http://www.graftonhall.co.nz/temp/fb.php',
)
$_FILES:
array (
)
$_GET:
array (
)
$_POST:
array (
  'TargetURL' => 'http://www.graftonhall.co.nz/temp/fb.php',
)
Request:
Accept: */*
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 189
Content-Type: Multipart/Form-Data,boundary=23264@18686#20663
Host: www.graftonhall.co.nz
User-Agent: Microsoft HTTP Post (RFC1867)



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21450&edit=1

Reply via email to