php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4785 Last POST variable has newline appended
Submitted: 2000-06-02 18:55 UTC Modified: 2000-09-04 22:22 UTC
From: pete at byways dot org Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.0 Release OS: Linux 2.2.15/RedHat 6.2
Private report: No CVE-ID: None
 [2000-06-02 18:55 UTC] pete at byways dot org
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!


Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-02 00:00 UTC] waldschrott@php.net
Can?t reproduce this, Please verify that it?s still happening using the latest version of PHP (release 4.0.1pl2 or CVS).
 [2000-08-02 23:38 UTC] pete at byways dot org
This still happens.  I'm using PHP CVS as of 8-2-2000, and Roxen 2.0.71 (latest from CVS).  However, I believe that this is a problem with Roxen, as it doesn't happen when running Apache.
 [2000-08-31 11:40 UTC] sniper@php.net
What's the situation with this? 
Is it bug in PHP4 or in Roxen?

--Jani
 [2000-08-31 23:52 UTC] pete at byways dot org
This must be a bug in Roxen.  It still occurs with latest PHP and Roxen, both using CGI and as a Pike module.  
 [2000-09-04 22:22 UTC] sniper@php.net
So it is roxen-bug. Not php4 problem. Closed.

--Jani
 [2004-03-03 08:24 UTC] fieg at digital4 dot nl
We don't use CGI with Roxen (no cgi)

We have the same problem but happens somtimes in the first and and sometimes in the last var

So we always post 2 vars extra
eg: 0bug and zbug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Aug 17 23:01:27 2024 UTC