PHP 4.0 Bug #4785: Last POST variable has newline appended

From: Date: Fri, 02 Jun 2000 16:55:10 +0000
Subject: PHP 4.0 Bug #4785: Last POST variable has newline appended
Groups: php.dev 
Request: Send a blank email to php-dev+get-20071@lists.php.net to get a copy of this message
From: pete@byways.org Operating system: Linux 2.2.15/RedHat 6.2 PHP version: 4.0.0 Release PHP Bug Type: Scripting Engine problem Bug description: Last POST variable has newline appended I am running PHP 4.0.0 as a CGI with Roxen 2.0.50. When POSTing form data to a PHP script, the last POST variable has a newline appended. I got it to happen using this simple script that shows the POSTed variables URLencoded. <html> <head><title>POST Test Form</title></head> <body> <form method=POST action=form_test.html> <input type=text name=FIELD1 size=10> <input type=text name=FIELD2 size=10> <input type=submit name=BUTTON value=Submit> <input type=button name=BUTTON2 value="JS Submit" onClick="this.form.submit()"> </form> <p>POST variables, UrlEncoded to show possible garbage:</p> <? if (is_array($HTTP_POST_VARS)): reset($HTTP_POST_VARS); while (list($var, $value) = each($HTTP_POST_VARS)): echo "$var: ".UrlEncode($value)."<br>"; endwhile; endif; ?> </body> </html> This could be a Roxen problem, but I'm reporting it both places in hopes someone can help!

« previous php.dev (#20071) next »