|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-27 10:51 UTC] moriyoshi@php.net
[2003-11-03 14:06 UTC] sniper@php.net
[2006-04-07 08:07 UTC] timecop at gmail dot com
[2006-05-11 21:24 UTC] hostgeekz at gmail dot com
[2006-08-10 06:25 UTC] cometfish at hotmail dot com
[2007-05-10 08:47 UTC] dlodhia at yahoo dot com
[2007-05-11 04:56 UTC] no_patience at hotmail dot com
[2007-07-03 11:34 UTC] info at netsilik dot nl
[2007-07-14 16:15 UTC] mgo dot netmail at gmail dot com
[2007-08-03 22:51 UTC] m_ellingham at hotmail dot com
[2007-08-08 15:03 UTC] marcel at cohnen dot nl
[2007-12-23 04:36 UTC] mondo at mondomx dot com
[2008-01-17 21:26 UTC] emmcmahon at comast dot net
[2008-01-25 00:06 UTC] jareeq at op dot pl
[2008-02-11 17:17 UTC] w dot antonia at beacon dot e-sussex dot sch dot uk
[2008-02-12 13:42 UTC] sri dot www at gmail dot com
[2008-03-05 14:43 UTC] schefer at webdessert dot ch
[2008-03-05 14:56 UTC] schefer at webdessert dot ch
[2008-09-16 01:58 UTC] mike dot dygert at adelphia dot net
[2008-12-15 02:28 UTC] ray_linn at hotmail dot com
[2009-01-20 14:31 UTC] paraporquerias at yahoo dot com
[2009-07-01 16:22 UTC] shaharjourno at hotmail dot com
[2009-09-10 10:53 UTC] just at helping dot com
[2010-02-03 16:17 UTC] gimi dot alb at gmail dot com,
[2010-02-13 12:57 UTC] sudeshkmr at yahoo dot com
[2011-03-28 02:15 UTC] mzbirka at centrum dot cz
[2011-10-11 12:33 UTC] seyhun_cavus at hotmail dot com
[2019-07-30 16:25 UTC] luckyranger at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
Description: ------------ The following code works in my local development environment (Win ME, Apache 1.3.2, PHP 4.3.2) but not on my host (RedHat 9, Apache 2.0.4, PHP 4.3.3). None of the form inputs defined after the <input type="file" size="40" name="userfile"> line are set in $_POST (all of those appearing before are). Therefore $_POST['submitimage'] does not get set. If I take out enctype="multipart/form-data", or replace it with "multipart/mixed" the $_POST variables are set, but the file is not available. The following php.ini directives are identical in both the local and host environments: File_Uploads = On Upload_Max_Filesize = 2M Upload_Tmp_Dir = (default) Post_Max_Size = 8M In my local environment Register_Globals is Off, and the host environment has them on. I have searched previous bug reports, and though I have seen similar problems, they all seem to be closed and rectified some time (over a year) ago, but my host is on release 4.3.3 - i.e. later than my dev environment. Thanks in anticipation, Jack. Reproduce code: --------------- .... if(!isset($_POST['submitimage'])) {.... <form action="<?=$_SERVER['PHP_SELF']?>" enctype="multipart/form-data" method="post"> <input type="text" maxlength="60" size="40" name="caption"> <input type="file" size="40" name="userfile"> <input type="hidden" name="MAX_FILE_SIZE" value="2000000"> <input type="submit" name="submitimage" value="Submit"> <input type="reset" value="Reset"> <input type="button" onClick="window.close();" name="noaction" value="No Action"> </form> .... <?php } elseif('Submit'==$_POST['submitimage']) { //process file .... Expected result: ---------------- I would expect the $_POST variables to be set, for example $_POST['submitimage'] should be set and allow the elseif clause to execute. Actual result: -------------- Only the $_POST variables defined in lines above the line: <input type="file" size="40" name="userfile"> get set. The ones below, including $_POST['submitimage'] do not get set.