ID: 20823 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Apache2 related Operating System: Redhat7.2 PHP Version: 4.3.0RC2 New Comment:
The previous comment was just a wrong post. Please ignore it :-) Previous Comments: ------------------------------------------------------------------------ [2002-12-06 11:29:06] [EMAIL PROTECTED] Oops, I should have meant php_strtok_r() replaces the delimiter "=" by "\0". ------------------------------------------------------------------------ [2002-12-05 12:59:27] [EMAIL PROTECTED] MoriYoshi, I read #18648. Yes, this looks like the same problem. Seems everyone having this is running Apache2 (as I am). I put a hidden element in the form so that more than one value was submitted in the POST and *_the_problem_goes_away_*. Sniper, here are some short files which trigger the problem. forSniper.html :: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>something short for [EMAIL PROTECTED] - part 1</title> </head> <body> <form action="forSniperResult.php" method="POST"><input type="text" name="recipient" value="sniper"><input type="submit"></form> </body> </html> forSniperResult.php :: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>something short for [EMAIL PROTECTED] - part 2</title> </head> <body> who = <?php echo $_REQUEST["recipient"]; ?> </body> </html> result :: who = sniperrecipient=sniper ------------------------------------------------------------------------ [2002-12-05 10:00:47] [EMAIL PROTECTED] We need a _SHORT_ example script which does not have any external requirements, such as mysql.. ------------------------------------------------------------------------ [2002-12-05 03:56:31] [EMAIL PROTECTED] Duplication of #18648? http://bugs.php.net/18648 ------------------------------------------------------------------------ [2002-12-04 23:02:58] [EMAIL PROTECTED] <?php var_dump($_REQUEST); ?> : array(3) { ["staffId"]=> string(10) "3staffId=3" ["trackerUser"]=> string(5) "staff" ["trackerPasswd"]=> string(5) "staff" } script: staffForm.php : <?php include("header.inc"); ?> <title>staff form</title> </head> <body> <?php if ( !isset($_REQUEST['staffId']) || $_REQUEST['staffId']==0 ) { return; } $staffId = substr($_REQUEST["staffId"], 1); // printf("<p>%s-%s</p>\n", $p_staffId, $_REQUEST["staffId"]); $query = "SELECT * FROM staff WHERE $staffId"; $result =& doQ($query); $row = mysql_fetch_array($result, MYSQL_ASSOC) ; $login = $row["login"]; $name = $row["firstName"] . " " . $row["lastName"]; $title = $row["title"]; //mysql_free_result($result); ?> <table cellpadding="3" cellspacing="0" border="0"> <tr> <td class="section">name</td> <td class="data"><?php echo $name; ?></td> </tr> <tr> <td class="section">title</td> <td class="data"><?php echo $title; ?></td> </tr> <tr> <td class="section">login</td> <td class="data"><?php echo $login; ?></td> </tr> <tr> <td class="section"><a href="modifyDuties.php?staffId=<?php echo $_REQUEST["staffId"]; ?>">duties</a></td> <td class="data"> <form action="modifyDuties.php?staffId=<?php echo $staffId; ?>" method="GET" name="staffForm"> <?php $result =& doQ("SELECT * FROM skill "); $result2 =& doQ("SELECT * FROM staffSkill WHERE $staffId "); $skills = array(); while ($row2 = mysql_fetch_array($result2, MYSQL_ASSOC) ) { $skills[] = $row2["skillId"]; } if ( count($skills) ) { while ($row = mysql_fetch_array($result, MYSQL_ASSOC) ) { if ( array_search( $row["skillId"], $skills) > -1 ) { print $row["skillName"]."<br>"; } } } else { print "No duties specified."; } /* Free resultset */ //mysql_free_result($result); //mysql_free_result($result2); ?> <!-- <a href="modifyDuties.php?staffId=<?php echo $staffId; ?>"><span class="modifyButton">modify</span></a></td> --> </tr> </table> <?php var_dump($_REQUEST); ?> </body> <?php /* Closing connection */ mysql_close($link); ?> </html> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/20823 -- Edit this bug report at http://bugs.php.net/?id=20823&edit=1
