From: ymalik at cs dot stevens dot edu Operating system: NetBSD 2.0.3 PHP version: 5.0.4 PHP Bug Type: Unknown/Other Function Bug description: CGI scripts no longer accepting POST data
Description: ------------ The following are two HTML forms along with their corresponding handlers: (1) a. http://www.cs.stevens-tech.edu/~ymalik/tmp/index.html b. http://www.cs.stevens-tech.edu/~ymalik/tmp/action.php (2) a. http://www.cs.stevens-tech.edu/~ymalik/tmp/index2.html b. http://www.cs.stevens-tech.edu/~ymalik/tmp/action.cgi 2.a is exactly the same as 1.a except the handler is action.cgi. Accordingly, 2.b is exactly the same as 1.b (with the shbang of course). When you submit using 1.a, the form data is displayed in the handler script. However, when you submit using 2.a, the data isn't displayed. This used to work fine before with PHP 4(I think about 1.5 years ago; I haven't used PHP with form data in a long time). Using CGI is not necessary is this case, but it is when interacting with the database; this has been done for "security reasons." Our sysadmin can't figure this one out, though. Here is the output for phpinfo(): http://www.cs.stevens.edu/~ymalik/phpinfo.php I have queried the bug system, but I have only found this problem with PHP 4. Thanks. Reproduce code: --------------- Here is the code for action.php: <?php print "Number of elements in POST: ". count($_POST) ."\n"; print_r($_POST); ?> and the code for action.cgi: #!/usr/pkg/bin/php <?php print "Number of elements in POST: ". count($_POST) ."\n"; print_r($_POST); ?> Expected result: ---------------- I expect to see the same output in action.cgi as I did in action.php Actual result: -------------- $_POST has no data in action.cgi. -- Edit bug report at http://bugs.php.net/?id=33276&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33276&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33276&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33276&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33276&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33276&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33276&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33276&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33276&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33276&r=support Expected behavior: http://bugs.php.net/fix.php?id=33276&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33276&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33276&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33276&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33276&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33276&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33276&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33276&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33276&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33276&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33276&r=mysqlcfg
