httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lmwangi <labenea...@gmail.com>
Subject [users@httpd] (Apache|php) Bug using modproxy
Date Wed, 26 Apr 2006 09:45:17 GMT
Hi all,
 First time on the list... sorry for any errs...

 I am using mod_proxy to pass requests to an internal server in our
lan. The setup looks like

Enduser---INet_link----->Mod_proxy_server----Lan--->PHP_script

Now,

this  does not work:

Enduser---https--->Apache_mod_proxy-----http--->Destination_server.

* When a user submits a form (php) with a file upload and  $_POST
vars, the $_POST array is mangled (missing) elements and the $_FILES
array is empty

while this works:

 Enduser---http--->Apache_mod_proxy-----http--->Destination_server.

* When a user submits a form with a file upload and  $_POST vars,
Everything is all good

So something bad? happens when you use https in the request. Anyone
able to reproduce this. Is it a php bug (i doubt it) but you never
know until u waddle through the mod_proxy voodoo.
A test link
https://www.mobileplanet.co.ke/MManager/test.php
http://www.mobileplanet.co.ke/MManager/test.php
Please note that without a file upload, the https post looks ok.

Here is a sample script


<snip>

<?php
        if(isset($_POST['btnSubmit'])){
                print_r($_POST);
                print_r($_FILES);
        }
        else{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Post Test</title>
 </head>

<body>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"
name="frm_add_content" id="frm_add_content"
enctype="multipart/form-data">
<div>
<input name="id" type="hidden" value="0" />
<input name="MAX_FILE_SIZE" type="hidden" value="2097152" />
<table border="0">

        <tr>
                <td style="white-space: nowrap; background-color:
#CCCCCC;" align="left" valign="top" colspan="2"><b>Add Media</b></td>
        </tr>
        <tr>
                <td align="right" valign="top"><span style="color:
#ff0000">*</span><b>Media id</b></td>
                <td valign="top" align="left"><input class="inputbox"
name="mediaid" type="text" /></td>
        </tr>

        <tr>
                <td align="right" valign="top"><b>Media File</b></td>
                <td valign="top" align="left"><input class="inputbox"
name="mms_media" type="file" /></td>
        </tr>
        <tr>
                <td align="right" valign="top"><span style="color:
#ff0000">*</span><b>Subject</b></td>
                <td valign="top" align="left"><input class="inputbox"
name="subject" type="text" /></td>

        </tr>
        <tr>
                <td align="right" valign="top"><b>Message Body</b></td>
                <td valign="top" align="left"><textarea
class="inputbox" name="msg_body"></textarea></td>
        </tr>
        <tr>
        <tr>

                <td align="right" valign="top"><b></b></td>
                <td valign="top" align="left"><input class="button"
name="btnClear" value="Clear" type="reset" />&nbsp;<input
class="button" name="btnSubmit" value="Submit" type="submit" /></td>
        </tr>
        <tr>
                <td></td>
        <td align="left" valign="top"><span style="font-size:80%;
color:#ff0000;">*</span><span style="font-size:80%;"> denotes required
field</span></td>
        </tr>

</table>
</div>
</form>
</body>
</html>
<?php
}
?>
</snip>


--
Article:
-
    And an unknown college dropout named Bill Gates, together with his
partner Paul Allen, wrote a version of the programming language BASIC
for the Altair, forming a company called Micro-Soft in the process. He
would later drop the hyphen and the capital S, and make billions of
dollars.
--
Comment:
+++
Dammit Slashdot! If you would just drop the capital S, you could be
making billions of dollars too!
+++++
http://slashdot.org/comments.pl?sid=171335&cid=14270286
+++++++
www.opensource.or.ke

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message