RE: [PHP] textarea posting duplicate text
Thanks, Dan. I copied your code exactly and posted it here: http://www.tidefans.com/test.php I pasted a large part of O'Henry's Gift of the Magi into the textarea, and it gets repeated, as before. Thanks for any help, Elizabeth -Original Message- From: Dan Tappin [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 6:59 PM To: Elizabeth Lawrence Subject: Re: [PHP] textarea posting duplicate text Create a new file: test.php with this exactly in the contents: HTML HEAD TITLETEST/TITLE /HEAD BODY FORM ACTION=test.php METHOD=post NAME=test TEXTAREA NAME=textarea ROWS=4 COLS=40/TEXTAREA PINPUT TYPE=submit NAME=submitButtonName/P /FORM P? print_r($_REQUEST); ?/P /BODY /HTML Load the page, enter some text and hit submit. Rule out some strange issue with your page. Confirm it's a PHP issue not a coding one. Dan T On Feb 28, 2005, at 8:03 AM, Elizabeth Lawrence wrote: Hello. I have been asked to look at a PHP issue for someone, and I can't figure out what the problem is. I'm hoping one of you experts can help! They are using Red Hat Linux / Ensim Pro 4.0.2, PHP 4.3.10, and Apache 2.0. The problem: When a lot of text is entered into a textarea on a form, the text that shows up in the $_POST['textarea'] variable has the text that was entered, but it is duplicated. This is causing problems for their forums. Here is a very simple script I placed on the server: www.tidefans.com/textarea_test.php (code below) When I place the same script on another server I have access to, the textarea text is posted fine. Is this a PHP setting somewhere that I'm missing? Here is the code for the PHP script mentioned above: html head titleTest PHP Script/title /head body form method=post action=textarea_test.php name=Form1 textarea cols=50 rows=20 name=textarea //[a bunch of text goes here] /textareabr input type=text name=text size=20 value=This is some textbr input type=submit name=Submit value=Submit ?php if ($_POST[Submit] != ) { echo h1_POST values/h1; echo pTextarea submitted:/p; echo pre . $_POST[textarea] . /pre; echo pTextbox submitted:/p; echo pre . $_POST[text] . /pre; echo pSubmit submitted:/p; echo pre . $_POST[Submit] . /pre; } ? /form ?php phpinfo(); ? /body /html If anyone can point me in the right direction, I would appreciate it so much! Elizabeth Elizabeth Lawrence [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] textarea posting duplicate text
On Tue, 2005-03-01 at 08:43, Elizabeth Lawrence wrote: Thanks, Dan. I copied your code exactly and posted it here: http://www.tidefans.com/test.php I pasted a large part of O'Henry's Gift of the Magi into the textarea, and it gets repeated, as before. Thanks for any help, Elizabeth There are some settings in php.ini that affect the max size of post variables. It is sort of interesting to me that it is not a complete copy but the first 1303 bytes or so are printed and then the test as a whole is there preceded by testarea=. It does not do this on my server. 4.3.6 apache 2 I notice that the Server API says Apache 2.0 Filter on your box and on mine it says Apache 2.0 Handler. I have no idea what that means. Bret -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] textarea posting duplicate text
On Tue, 2005-03-01 at 10:19, Bret Hughes wrote: On Tue, 2005-03-01 at 08:43, Elizabeth Lawrence wrote: Thanks, Dan. I copied your code exactly and posted it here: http://www.tidefans.com/test.php I pasted a large part of O'Henry's Gift of the Magi into the textarea, and it gets repeated, as before. Thanks for any help, Elizabeth There are some settings in php.ini that affect the max size of post variables. It is sort of interesting to me that it is not a complete copy but the first 1303 bytes or so are printed and then the test as a whole is there preceded by testarea=. It does not do this on my server. 4.3.6 apache 2 I notice that the Server API says Apache 2.0 Filter on your box and on mine it says Apache 2.0 Handler. I have no idea what that means. Bret Hmm I did not remember writing the bit about post_max_size. I was checking your settings in the phpinfo output when I found the filter/handler deal. obviously the post_max_size is not the culprit. Bret -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] textarea posting duplicate text
It's definitely on your end: http://www.orourke.ca/test.php I verified your issue on your server and could not reproduce it on mine. Our phpinfo data looks the same. Here's a hunch. Try calling output buffering at the top of your page: ob_start(); I have this on my site to allow for mid-page redirects. I have no idea if this is the cause. Just an idea. Perhaps an Apache 2 issue? Can any one else confirm this on Apache 2 / PHP 4.3.10? Dan T On Mar 1, 2005, at 7:43 AM, Elizabeth Lawrence wrote: Thanks, Dan. I copied your code exactly and posted it here: http://www.tidefans.com/test.php I pasted a large part of O'Henry's Gift of the Magi into the textarea, and it gets repeated, as before. Thanks for any help, Elizabeth -Original Message- From: Dan Tappin [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 6:59 PM To: Elizabeth Lawrence Subject: Re: [PHP] textarea posting duplicate text Create a new file: test.php with this exactly in the contents: HTML HEAD TITLETEST/TITLE /HEAD BODY FORM ACTION=test.php METHOD=post NAME=test TEXTAREA NAME=textarea ROWS=4 COLS=40/TEXTAREA PINPUT TYPE=submit NAME=submitButtonName/P /FORM P? print_r($_REQUEST); ?/P /BODY /HTML Load the page, enter some text and hit submit. Rule out some strange issue with your page. Confirm it's a PHP issue not a coding one. Dan T On Feb 28, 2005, at 8:03 AM, Elizabeth Lawrence wrote: Hello. I have been asked to look at a PHP issue for someone, and I can't figure out what the problem is. I'm hoping one of you experts can help! They are using Red Hat Linux / Ensim Pro 4.0.2, PHP 4.3.10, and Apache 2.0. The problem: When a lot of text is entered into a textarea on a form, the text that shows up in the $_POST['textarea'] variable has the text that was entered, but it is duplicated. This is causing problems for their forums. Here is a very simple script I placed on the server: www.tidefans.com/textarea_test.php (code below) When I place the same script on another server I have access to, the textarea text is posted fine. Is this a PHP setting somewhere that I'm missing? Here is the code for the PHP script mentioned above: html head titleTest PHP Script/title /head body form method=post action=textarea_test.php name=Form1 textarea cols=50 rows=20 name=textarea //[a bunch of text goes here] /textareabr input type=text name=text size=20 value=This is some textbr input type=submit name=Submit value=Submit ?php if ($_POST[Submit] != ) { echo h1_POST values/h1; echo pTextarea submitted:/p; echo pre . $_POST[textarea] . /pre; echo pTextbox submitted:/p; echo pre . $_POST[text] . /pre; echo pSubmit submitted:/p; echo pre . $_POST[Submit] . /pre; } ? /form ?php phpinfo(); ? /body /html If anyone can point me in the right direction, I would appreciate it so much! Elizabeth Elizabeth Lawrence [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] textarea posting duplicate text
Elizabeth Lawrence wrote: Thanks, Dan. I copied your code exactly and posted it here: http://www.tidefans.com/test.php I pasted a large part of O'Henry's Gift of the Magi into the textarea, and it gets repeated, as before. There was an Apache2/PHP bug going around that had this issue. It was an older version of PHP and/or Apache2 that I thought was fixed, though. Maybe your running into this same issue? Try searching the PHP bug database for apache2 duplicate and see if you can find the old bug/issue. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] textarea posting duplicate text
Elizabeth! Have you considered reinstalling PHP on your server? Maybe, it is worth the effort? Regards, Frank 2005-03-01 kl. 17.19 skrev Bret Hughes: On Tue, 2005-03-01 at 08:43, Elizabeth Lawrence wrote: Thanks, Dan. I copied your code exactly and posted it here: http://www.tidefans.com/test.php I pasted a large part of O'Henry's Gift of the Magi into the textarea, and it gets repeated, as before. Thanks for any help, Elizabeth There are some settings in php.ini that affect the max size of post variables. It is sort of interesting to me that it is not a complete copy but the first 1303 bytes or so are printed and then the test as a whole is there preceded by testarea=. It does not do this on my server. 4.3.6 apache 2 I notice that the Server API says Apache 2.0 Filter on your box and on mine it says Apache 2.0 Handler. I have no idea what that means. Bret -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Frank Arensmeier Marketing Support NIKE HYDRAULICS AB Box 1107 631 80 Eskilstuna Sweden tel +46 16 82 34 fax +46 16 13 93 16 email: [EMAIL PROTECTED] www.nikehydraulics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] textarea posting duplicate text
Hello. I have been asked to look at a PHP issue for someone, and I can't figure out what the problem is. I'm hoping one of you experts can help! They are using Red Hat Linux / Ensim Pro 4.0.2, PHP 4.3.10, and Apache 2.0. The problem: When a lot of text is entered into a textarea on a form, the text that shows up in the $_POST['textarea'] variable has the text that was entered, but it is duplicated. This is causing problems for their forums. Here is a very simple script I placed on the server: www.tidefans.com/textarea_test.php (code below) When I place the same script on another server I have access to, the textarea text is posted fine. Is this a PHP setting somewhere that I'm missing? Here is the code for the PHP script mentioned above: html head titleTest PHP Script/title /head body form method=post action=textarea_test.php name=Form1 textarea cols=50 rows=20 name=textarea //[a bunch of text goes here] /textareabr input type=text name=text size=20 value=This is some textbr input type=submit name=Submit value=Submit ?php if ($_POST[Submit] != ) { echo h1_POST values/h1; echo pTextarea submitted:/p; echo pre . $_POST[textarea] . /pre; echo pTextbox submitted:/p; echo pre . $_POST[text] . /pre; echo pSubmit submitted:/p; echo pre . $_POST[Submit] . /pre; } ? /form ?php phpinfo(); ? /body /html If anyone can point me in the right direction, I would appreciate it so much! Elizabeth Elizabeth Lawrence [EMAIL PROTECTED]
Re: [PHP] textarea posting duplicate text
Elizabeth Lawrence wrote: Hello. I have been asked to look at a PHP issue for someone, and I can't figure out what the problem is. I'm hoping one of you experts can help! They are using Red Hat Linux / Ensim Pro 4.0.2, PHP 4.3.10, and Apache 2.0. The problem: When a lot of text is entered into a textarea on a form, the text that shows up in the $_POST['textarea'] variable has the text that was entered, but it is duplicated. Have you verified that the POST data itself is doubled?... This sounds REALLY weird to me... This is causing problems for their forums. Here is a very simple script I placed on the server: www.tidefans.com/textarea_test.php (code below) When I place the same script on another server I have access to, the textarea text is posted fine. Is this a PHP setting somewhere that I'm missing? There's certainly on double long POST data setting :-) It could be a bug in PHP or Apache -- Search their bug databases. http://bugs.php.net/ for PHP. http://apache.org/ should lead you to it for Apache. You're on your own for Ensim Pro, whatever that is. I would also recommend that you start LOGGING the text inputs that are giving problems as they come in. EG: ?php $input = $_POST['input']; $len = strlen($input); if ($len 10 substr($input, 0, $len/2) == substr($input, $len/2)){ error_log(Double Input: $input); } ? This may lead you to finding some commonality in the input text other than length that is not immediately apparent right now. Actually, I guess you *COULD* just use the code above or similar to automatically strip out the doubled text -- But document/comment the hell out of that unless you want to confuse every developer that ever looks at it!!! -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php