From: [EMAIL PROTECTED]
Operating system: Windows 2000 Pro
PHP version: 4CVS-2003-01-05 (dev)
PHP Bug Type: Unknown/Other Function
Bug description: File Posts from Microsoft Web Publishing Wizard don't work.
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 bug report at http://bugs.php.net/?id=21450&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21450&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21450&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21450&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21450&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21450&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21450&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21450&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21450&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21450&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21450&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21450&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21450&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21450&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=21450&r=gnused