From: eadwint at fastmail dot fm Operating system: Win2K PHP version: 4.3.5RC1 PHP Bug Type: Variables related Bug description: PHP_SELF blank and does not appear to run.
Description: ------------ PHP_SELF is doesn't seen to be visible in view source When I press submit it doesn't seem to do anything! I looked into it on the php site and found a bug (Bug #21261 and 4060 http://bugs.php.net/bug.php?id=21261). I then downloaded and installed the latest php snapshot (4.3.5RC1)but the problem persists. As a person fairly new to development I'm a bit stumped, have you any suggestions? The closure details of 4060 "Fixed by Frank in CVS" are insufficient for me to know what to do next. Reproduce code: --------------- <html> <body> <?php if ($submit) { // process form while (list($name, $value) = each($HTTP_POST_VARS)) { echo "$name = $value<br>\n"; } } else{ // display form ?> <form method="post" action="<?php echo $PHP_SELF?>"> First name:<input type="Text" name="first"><br> Last name:<input type="Text" name="last"><br> Address:<input type="Text" name="address"><br> Position:<input type="Text" name="position"><br> <input type="Submit" name="submit" value="Enter information"> </form> <?php } // end if ?> </body> </html> Appears as follows when I view source: <html> <body> <form method="post" action=""> First name:<input type="Text" name="first"><br> Last name:<input type="Text" name="last"><br> Address:<input type="Text" name="address"><br> Position:<input type="Text" name="position"><br> <input type="Submit" name="submit" value="Enter information"> </form> </body> </html> Expected result: ---------------- A display of the variables placed in the form displayed on screen when submit button is pressed. Actual result: -------------- The form resets itself and data entered is lost. -- Edit bug report at http://bugs.php.net/?id=27019&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27019&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27019&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27019&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27019&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27019&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27019&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27019&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27019&r=support Expected behavior: http://bugs.php.net/fix.php?id=27019&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27019&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27019&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27019&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27019&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27019&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27019&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27019&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27019&r=float