|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-14 08:18 UTC] gopalv82 at yahoo dot com
[2009-02-18 23:01 UTC] shire@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 12:00:01 2025 UTC |
Description: ------------ When experimenting with the new APC_UPLOAD_PROGRESS code, Apache doesn't send response headers when an input named APC_UPLOAD_PROGESS is not followed by an html file input. This results in apache trying to send the file directly to the client instead of interpreting it. You can test the bug using with attached example code and passing in ?bug in the url. './configure' '--with-apxs2=/usr/local/apache2.2/bin/apxs' '--with-mm=/usr/local/src/mm-1.4.0' '--with-mysql' '--with-pgsql' '--with-curl=/usr/local/src/curl-7.16.1' '--with-iconv' '--enable-memcache' '--prefix=/usr/local/php5.2.1' '--with-gd' '--enable-mbstring' '--with-jpeg-dir=/opt' '--with-png-dir=/usr/lib' '--with-zlib' '--with-imap' '--with-kerberos' '--with-imap-ssl' extension="apc.so" apc.shm_segments=1 apc.shm_size=128 apc.ttl=7200 apc.user_ttl=7200 apc.num_files_hint=1024 apc.rfc1867 = on extension="zip.so" upload_max_filesize = 64M post_max_size = 128M file_uploads = On memory_limit = 128M Reproduce code: --------------- <html> <body> <pre> <?php if ($_POST && $_FILES) { print_r($_POST); print("\n\n"); print_r($_FILES); } ?> </pre> <form method=post enctype='multipart/form-data'> <? if(!isset($_GET['bug'])) print "<input type='hidden' name='APC_UPLOAD_PROGRESS' value='2234' />"; ?> <input type='file' name='myfile' /> <? if(isset($_GET['bug'])) print "<input type='hidden' name='APC_UPLOAD_PROGRESS' value='2234' />"; ?> <input type='submit' name='Upload' /> </form> </body> </html> Expected result: ---------------- That the page would load as normal and APC_UPLOAD_PROGRESS would be ignored, since it isn't followed by a file, and logging an error message or throwing a warning. Actual result: -------------- Apache tries to serve the test.php file, but I get a file with no contents if I instruct firefox(2.0.0.3) to open or save. Firebug does not display any response headers from apache.